!function(){"use strict";function t(t,e){e?(d[0]=d[16]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=d[9]=d[10]=d[11]=d[12]=d[13]=d[14]=d[15]=0,this.blocks=d):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=t}function i(e,i,a){var n,o=typeof e;if("string"===o){var r,d=[],l=e.length,s=0;for(n=0;n>6,d[s++]=128|63&r):r<55296||r>=57344?(d[s++]=224|r>>12,d[s++]=128|r>>6&63,d[s++]=128|63&r):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++n)),d[s++]=240|r>>18,d[s++]=128|r>>12&63,d[s++]=128|r>>6&63,d[s++]=128|63&r);e=d}else{if("object"!==o)throw new Error(h);if(null===e)throw new Error(h);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(h)}e.length>64&&(e=new t(i,!0).update(e).array());var c=[],u=[];for(n=0;n<64;++n){var p=e[n]||0;c[n]=92^p,u[n]=54^p}t.call(this,i,a),this.update(u),this.oKeyPad=c,this.inner=!0,this.sharedMemory=a}var h="input is invalid type",r="object"==typeof window,s=r?window:{};s.JS_SHA256_NO_WINDOW&&(r=!1);var e=!r&&"object"==typeof self,n=!s.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;n?s=global:e&&(s=self);var o=!s.JS_SHA256_NO_COMMON_JS&&"object"==typeof module&&module.exports,a="function"==typeof define&&define.amd,f=!s.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,u="0123456789abcdef".split(""),c=[-2147483648,8388608,32768,128],y=[24,16,8,0],p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=["hex","array","digest","arrayBuffer"],d=[];!s.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!f||!s.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var A=function(e,i){return function(a){return new t(i,!0).update(a)[e]()}},w=function(e){var i=A("hex",e);n&&(i=b(i,e)),i.create=function(){return new t(e)},i.update=function(t){return i.create().update(t)};for(var a=0;a>2]|=t[o]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(d[n>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=64?(this.block=d[16],this.start=n-64,this.hash(),this.hashed=!0):this.start=n}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},t.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=c[3&e],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},t.prototype.hash=function(){var t,e,i,a,n,o,r,d,l,s=this.h0,c=this.h1,u=this.h2,m=this.h3,g=this.h4,_=this.h5,y=this.h6,f=this.h7,v=this.blocks;for(t=16;t<64;++t)e=((n=v[t-15])>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,i=((n=v[t-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,v[t]=v[t-16]+e+v[t-7]+i<<0;for(l=c&u,t=0;t<64;t+=4)this.first?(this.is224?(o=300032,f=(n=v[0]-1413257819)-150054599<<0,m=n+24177077<<0):(o=704751109,f=(n=v[0]-210244248)-1521486534<<0,m=n+143694565<<0),this.first=!1):(e=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),a=(o=s&c)^s&u^l,f=m+(n=f+(i=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&_^~g&y)+p[t]+v[t])<<0,m=n+(e+a)<<0),e=(m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10),a=(r=m&s)^m&c^o,y=u+(n=y+(i=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&g^~f&_)+p[t+1]+v[t+1])<<0,e=((u=n+(e+a)<<0)>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),a=(d=u&m)^u&s^r,_=c+(n=_+(i=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&f^~y&g)+p[t+2]+v[t+2])<<0,e=((c=n+(e+a)<<0)>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),a=(l=c&u)^c&m^d,g=s+(n=g+(i=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&y^~_&f)+p[t+3]+v[t+3])<<0,s=n+(e+a)<<0;this.h0=this.h0+s<<0,this.h1=this.h1+c<<0,this.h2=this.h2+u<<0,this.h3=this.h3+m<<0,this.h4=this.h4+g<<0,this.h5=this.h5+_<<0,this.h6=this.h6+y<<0,this.h7=this.h7+f<<0},t.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,i=this.h2,a=this.h3,n=this.h4,o=this.h5,r=this.h6,d=this.h7,l=u[t>>28&15]+u[t>>24&15]+u[t>>20&15]+u[t>>16&15]+u[t>>12&15]+u[t>>8&15]+u[t>>4&15]+u[15&t]+u[e>>28&15]+u[e>>24&15]+u[e>>20&15]+u[e>>16&15]+u[e>>12&15]+u[e>>8&15]+u[e>>4&15]+u[15&e]+u[i>>28&15]+u[i>>24&15]+u[i>>20&15]+u[i>>16&15]+u[i>>12&15]+u[i>>8&15]+u[i>>4&15]+u[15&i]+u[a>>28&15]+u[a>>24&15]+u[a>>20&15]+u[a>>16&15]+u[a>>12&15]+u[a>>8&15]+u[a>>4&15]+u[15&a]+u[n>>28&15]+u[n>>24&15]+u[n>>20&15]+u[n>>16&15]+u[n>>12&15]+u[n>>8&15]+u[n>>4&15]+u[15&n]+u[o>>28&15]+u[o>>24&15]+u[o>>20&15]+u[o>>16&15]+u[o>>12&15]+u[o>>8&15]+u[o>>4&15]+u[15&o]+u[r>>28&15]+u[r>>24&15]+u[r>>20&15]+u[r>>16&15]+u[r>>12&15]+u[r>>8&15]+u[r>>4&15]+u[15&r];return this.is224||(l+=u[d>>28&15]+u[d>>24&15]+u[d>>20&15]+u[d>>16&15]+u[d>>12&15]+u[d>>8&15]+u[d>>4&15]+u[15&d]),l},t.prototype.toString=t.prototype.hex,t.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,i=this.h2,a=this.h3,n=this.h4,o=this.h5,r=this.h6,d=this.h7,l=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24&255,i>>16&255,i>>8&255,255&i,a>>24&255,a>>16&255,a>>8&255,255&a,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,r>>24&255,r>>16&255,r>>8&255,255&r];return this.is224||l.push(d>>24&255,d>>16&255,d>>8&255,255&d),l},t.prototype.array=t.prototype.digest,t.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t},i.prototype=new t,i.prototype.finalize=function(){if(t.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();t.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),t.prototype.finalize.call(this)}};var B=w();B.sha256=B,B.sha224=w(!0),B.sha256.hmac=_(),B.sha224.hmac=_(!0),o?module.exports=B:(s.sha256=B.sha256,s.sha224=B.sha224,a&&define(function(){return B}))}(),"function"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(t){return 0===this.lastIndexOf(t,0)}),"function"!=typeof String.prototype.endsWith&&(String.prototype.endsWith=function(t){return-1!==this.indexOf(t,this.length-t.length)}),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),"function"!=typeof Array.prototype.find&&(Array.prototype.find=function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError("callback must be a function");for(var a=arguments[1],n=0;n>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var a=arguments[1],n=0;n>>0,a=new Array(i),n=this,o=0,r=-1;if(void 0===e)for(;++r!==i;)if(r in this)if(t(n[r],r,n))a[o++]=n[r];else for(;++r!==i;)r in this&&t.call(e,n[r],r,n)&&(a[o++]=n[r]);return a.length=o,a}),"function"!=typeof Array.prototype.map&&(Array.prototype.map=function(t){var e,i,a;if(null==this)throw new TypeError("this is null or not defined");var n=Object(this),o=n.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(e=arguments[1]),i=new Array(o),a=0;a>>0,n=0;if(arguments.length>=2)e=arguments[1];else{for(;n=a)throw new TypeError("Reduce of empty array with no initial value");e=i[n++]}for(;n/g,">").replaceAll(/").replaceAll(/</g,"<").replaceAll(/'/g,"'").replaceAll(/"/g,'"').replaceAll(/¥/g,"\\").replaceAll(/{/g,"{").replaceAll(/}/g,"}")},String.prototype.format=function(){for(var t=this,e=0;e0&&t.push(e)}),t},Array.prototype.random=function(){return this[Math.floor(Math.random()*this.length)]},Array.prototype.unique=function(){return Array.from(new Set(this))},Array.prototype.except=function(t){var e=this;return Array.isArray(t)&&t.forEach(function(t){var i=e.indexOf(t);-1!=i&&e.splice(i,1)}),e},Array.prototype.only=function(t){var e=[];return Array.isArray(t)&&this.forEach(function(i){-1!=t.indexOf(i)&&e.push(i)}),e},Array.prototype.insert=function(t,e){this.splice(t,0,e)};var equalsLadiPage=function(t,e){return isObjectLadiPage(window.angular)&&isFunctionLadiPage(window.angular.equals)?window.angular.equals(t,e):Object.prototype.toString.call(t)==Object.prototype.toString.call(e)&&JSON.stringify(t)==JSON.stringify(e)},isObjectLadiPage=function(t){return"[object Object]"==Object.prototype.toString.call(t)},isArrayLadiPage=function(t){return"[object Array]"==Object.prototype.toString.call(t)},isFunctionLadiPage=function(t){return"[object Function]"==Object.prototype.toString.call(t)||"[object AsyncFunction]"==Object.prototype.toString.call(t)},isBooleanLadiPage=function(t){return"[object Boolean]"==Object.prototype.toString.call(t)},isStringLadiPage=function(t){return"[object String]"==Object.prototype.toString.call(t)},isEmptyLadiPage=function(t){return!!isNullLadiPage(t)||(isStringLadiPage(t)?0==(t=t.trim().toLowerCase()).length||"undefined"==t||"null"==t:!!isArrayLadiPage(t)&&0==t.length)},isNullLadiPage=function(t){return"[object Null]"==Object.prototype.toString.call(t)||"[object Undefined]"==Object.prototype.toString.call(t)},parseFloatLadiPage=function(t,e){var i=parseFloat(t);try{return parseFloat(LadiPageScript.formatNumber(i,21,null,e||6))}catch(t){return NaN}},decodeURIComponentLadiPage=function(t){try{return decodeURIComponent(t)}catch(e){return t}},formatNumber=function(t,e,i,a){(isEmptyLadiPage(i)||isEmptyLadiPage(a))&&(i="",a=0),isEmptyLadiPage(e)&&(e="");var n=LadiPageScript.formatNumber(t,null,null,a);return n=(n=n.replaceAll(",","LADIPAGE_NUMBER_COMMA").replaceAll(".","LADIPAGE_NUMBER_DOT")).replaceAll("LADIPAGE_NUMBER_COMMA",e).replaceAll("LADIPAGE_NUMBER_DOT",i)},textToNumber=function(t,e,i,a){(isEmptyLadiPage(i)||isEmptyLadiPage(a))&&(a=0);var n=String(t);return isEmptyLadiPage(e)||(n=n.replaceAll(e,"")),isEmptyLadiPage(i)||(n=n.replaceAll(i,".")),n=n.split("."),n=a<=0||1==n.length?n[0]:n[0]+"."+n[1].substring(0,a),parseFloatLadiPage(n)||0},formatNumberComma=function(t,e){return formatNumber(t,",",".",e)},textToNumberComma=function(t,e){return textToNumber(t,",",".",e)},formatNumberDot=function(t,e){return formatNumber(t,".",",",e)},textToNumberDot=function(t,e){return textToNumber(t,".",",",e)},Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(t){var e,i,a,n,o,r,d,l="",s=0;for(t=Base64._utf8_encode(t);s>2,o=(3&e)<<4|(i=t.charCodeAt(s++))>>4,r=(15&i)<<2|(a=t.charCodeAt(s++))>>6,d=63&a,isNaN(i)?r=d=64:isNaN(a)&&(d=64),l=l+Base64._keyStr.charAt(n)+Base64._keyStr.charAt(o)+Base64._keyStr.charAt(r)+Base64._keyStr.charAt(d);return l},decode:function(t){var e,i,a,n,o,r,d="",l=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,i=(15&n)<<4|(o=Base64._keyStr.indexOf(t.charAt(l++)))>>2,a=(3&o)<<6|(r=Base64._keyStr.indexOf(t.charAt(l++))),d+=String.fromCharCode(e),64!=o&&(d+=String.fromCharCode(i)),64!=r&&(d+=String.fromCharCode(a));return d=Base64._utf8_decode(d)},_utf8_encode:function(t){t=t.replace(/\r\n/g,"\n");for(var e="",i=0;i127&&a<2048?(e+=String.fromCharCode(a>>6|192),e+=String.fromCharCode(63&a|128)):(e+=String.fromCharCode(a>>12|224),e+=String.fromCharCode(a>>6&63|128),e+=String.fromCharCode(63&a|128))}return e},_utf8_decode:function(t){for(var e="",i=0,a=0,n=0,o=0;i191&&a<224?(o=t.charCodeAt(i+1),e+=String.fromCharCode((31&a)<<6|63&o),i+=2):(o=t.charCodeAt(i+1),n=t.charCodeAt(i+2),e+=String.fromCharCode((15&a)<<12|(63&o)<<6|63&n),i+=3);return e}},LadiPageScriptV2=LadiPageScriptV2||function(){};LadiPageScriptV2.prototype.init=function(){this.const={DESKTOP:"desktop",MOBILE:"mobile",DEVICE:"device",DOMAIN_GOOGLE_DOCS:"docs.google.com",POWERED_BY_IMAGE:"https://w.ladicdn.com/source/v3/by/ladipage.svg?v=1.0",STATIC_W_DOMAIN:"w.ladicdn.com",STATIC_S_DOMAIN:"s.ladicdn.com",APP_RUNTIME_PREFIX:"_runtime",SCRIPT_LADI_FONT:"ladi-font",SCRIPT_LADI_VARIABLE:"ladi-variable",META_VERSION:{two:2},OPTIMIZE_EXCEPT_EVENT_DATA_KEY_LIST:["custom_style","custom_css","option.form_api_data","option.spinlucky_setting.list_value"],OPTIMIZE_EVENT_DATA_KEY_LIST:["option.website_list_post_by_category_id","option.website_list_post_by_tag_id","device.option.collection_setting.list_type","scrolling","seller_name","seller_content","seller_like","form_data","value","operator","form_item_value","form_item_type","form_item_type","conditions","dataset_id","sheet_id","image","content","name","verify","time","like","list","text_operator_2","text_operator_1","text_sort_2","text_sort_1","text_description","total","star","star_review","text_unit","star_max","title","link_mapping","color","background_color","border_color","opacity","transform_scale","custom_css","dropbox","padding","animation_duration","str","is_clipboard","link_mapping_custom","change_index_type","change_index_number","collapse_start_is_show","lightbox_type","hidden_ids","show_ids","image_url","video_url","video_type","iframe_url","ontop","action","target","nofollow","position","animation_name","action_type","background-class","background-style","background-image","background-color","background-position","background-repeat","background-size","is_multiple_otp","otp_config_id","is_multiple","is_caption","is_input_label","mapping_form_id","next_button_text","mapping_form_name","input_name","input_required","input_placeholder","show_label","input_tabindex","input_standard","input_checkbox_type","product_setting","ladisale_store_id","form_account_id","options","option.data_formula.is_enable","option.data_formula.text","option.meta_data.version","device.option.carousel_crop.margin_item","device.option.carousel_setting.display_type","option.carousel_setting.autoplay_type","option.only_facebook_widget","option.sync_ladichat_form_account_id","option.sync_ladishare_form_account_id","option.sync_ladiflow_form_account_id","option.sync_ladisales_form_account_id","option.spinlucky_setting.list_value","option.spinlucky_setting.result_popup_id","option.spinlucky_setting.result_message","option.spinlucky_setting.max_turn","option.sheet_id","option.time_show","option.time_delay","option.data_event","option.action_funnel","option.data_tooltip.text","option.data_tooltip.type","option.data_tooltip.position","option.data_tooltip.size","option.conversion_name","option.google_ads_conversion","option.google_ads_label","option.event_custom_script","option.video_value","option.video_type","option.video_control","option.background_video.video_value","option.background_video.video_type","option.show_popup_welcome_page","option.delay_popup_welcome_page","option.show_popup_exit_page","option.popup_welcome_page_scroll_to","option.countdown_item_type","option.countdown_type","option.countdown_minute","option.countdown_daily_start","option.countdown_daily_end","option.countdown_endtime","option.input_type","option.input_default_value","option.input_tabindex","option.form_config_id","option.ladisale_store_id","option.product_tag_id","option.form_send_ladipage","option.data_submit_form_id","option.thankyou_type","option.thankyou_value","option.deeplink_value","option.form_thankyou_funnel","option.form_api_data","option.form_conversion_name","option.form_google_ads_conversion","option.form_purchase_value","option.form_google_ads_label","option.form_event_custom_script","option.form_auto_funnel","option.form_captcha","option.form_auto_complete","option.form_auto_capture","option.input_country","option.is_add_to_cart","option.is_form_coupon","option.is_form_login","option.is_form_otp","option.is_submit_form","option.is_buy_now","option.is_buy_now_ladisales","option.is_add_to_cart_ladisales","option.form_account_id","option.product_type","option.product_id","option.product_variant_id","option.product_mapping_name","option.product_mapping_name_custom","option.product_variant","option.product_variant_type","option.product_variant_title","option.product_variant_price","option.message_no_product","option.cart_layout","option.collection_setting.type","option.data_setting.type","option.data_setting.type_dataset","option.data_setting.value","option.data_setting.sort_name","option.data_setting.sort_by","option.combobox_type","option.survey_setting.is_multiple","option.survey_setting","option.form_setting","option.tabs_setting.current_tab","option.shape_setting.2nd_click","option.shape_setting.source_2nd_click","option.survey_setting.input_name","option.survey_setting.input_required","option.sync_ladisales","option.sync_ladiflow","option.sync_ladishare","option.sync_ladichat","device.option.auto_scroll","device.option.sticky","device.option.sticky_position","device.option.sticky_position_top","device.option.sticky_position_left","device.option.sticky_position_bottom","device.option.sticky_position_right","device.option.readmore_range","device.option.gallery_control.autoplay","device.option.gallery_control.autoplay_time","device.option.video_autoplay","device.option.popup_position","device.option.popup_backdrop","device.option.carousel_setting.autoplay","device.option.carousel_setting.autoplay_time","device.option.carousel_crop.width","device.option.carousel_crop.width_item","device.style.animation-name","device.style.animation-delay","device.option.collection_setting.row","device.option.collection_setting.column","device.option.collection_setting.margin","device.option.image_setting.2nd_click","device.option.image_setting.source_2nd_click","device.option.position","device.option.shape_setting.source_2nd_click","device.option.background-style"],ACTION_TYPE:{menu:"menu",action:"action","1st_click":"1st_click","2nd_click":"2nd_click",hover:"hover",complete:"complete",open_popup:"open_popup",close_popup:"close_popup"},DATA_ACTION_TYPE:{link:"link",page:"page",category:"category",post:"post",section:"section",email:"email",phone:"phone",popup:"popup",dropbox:"dropbox",hidden_show:"hidden_show",collapse:"collapse",set_value:"set_value",tracking:"tracking",custom_script:"custom_script",copy_clipboard:"copy_clipboard",change_index:"change_index",set_style:"set_style",set_value_2nd:"set_value_2nd",lightbox:"lightbox",popup_cart:"popup_cart",popup_checkout:"popup_checkout",next_funnelx:"next_funnelx",set_goal:"set_goal",set_finish:"set_finish"},DATA_ACTION_LIGHTBOX_TYPE:{image:"image",video:"video",iframe:"iframe"},WEBSITE_PATH_DNS:{category:"c",tag:"t",post:"p",page:"",policy:"",news:"",search:""},COUNTDOWN_TYPE:{countdown:"countdown",daily:"daily",endtime:"endtime"},COUNTDOWN_ITEM_TYPE:{day:"day",hour:"hour",minute:"minute",seconds:"seconds"},CAROUSEL_DISPLAY_TYPE:{vertical:"vertical",horizontal:"horizontal"},CAROUSEL_INDICATORS_TYPE_TYPE:{none:"none",circle:"circle",number:"number"},CAROUSEL_AUTOPLAY_TYPE:{type_ab:"type_ab",type_abab:"type_abab",type_abba:"type_abba"},VIDEO_TYPE:{youtube:"youtube",direct:"direct"},BACKGROUND_STYLE:{solid:"solid",gradient:"gradient",image:"image",video:"video"},PUBLISH_PLATFORM:{ladipage:"LADIPAGE",ladipagedns:"LADIPAGEDNS",wordpress:"WORDPRESS",haravan:"HARAVAN",sapo:"SAPO",shopify:"SHOPIFY",itop:"ITOPWEBSITE",ftp:"FTP",other:"OTHER"},SECTION_TYPE:{default:"DEFAULT",global:"GLOBAL"},FUNNELX_DISPLAY_SETTING_SHOW_TYPE:{time:"time",leave_page:"leave_page",scroll:"scroll",first_click:"first_click",loaded:"loaded"},FUNNELX_DISPLAY_SETTING_SCROLL_TYPE:{ontop:"ontop",onmiddle:"onmiddle",onbottom:"onbottom"},FUNNELX_DISPLAY_SETTING_HIDE_TYPE:{disable:"disable",hour:"hour",day:"day"},TRACKING_NAME:"ladicid",ACCESS_KEY_NAME:"ladiack",LADIFLOW_DATA_KEY_NAME:"ladifd",REF_NAME:"ref",OTP_TYPE:{send:"OTP_SEND",resend:"OTP_RESEND",sms:"OTP_SMS",voice:"OTP_VOICE",zns:"OTP_ZNS"},STATUS_SEND:{capture:1,otp:1,sendform:2},PUBLISH_STYLE:{desktop_min_width:768,mobile_small_min_width:320},ANIMATED_LIST:["rotate-1","rotate-2","rotate-3","type","scale","loading-bar","slide","clip","zoom","push"],POSITION_TYPE:{default:"default",top:"top",bottom:"bottom",top_left:"top_left",top_center:"top_center",top_right:"top_right",center_left:"center_left",center_right:"center_right",bottom_left:"bottom_left",bottom_center:"bottom_center",bottom_right:"bottom_right"},COLLECTION_TYPE:{carousel:"carousel",readmore:"readmore"},COLLECTION_LIST_TYPE:{horizontal:"horizontal",vertical:"vertical"},INPUT_TYPE:{tel:"tel",password:"password",text:"text",date:"date",select_multiple:"select_multiple",number:"number",email:"email",textarea:"textarea",select:"select",radio:"radio",checkbox:"checkbox",facebook_checkbox_plugin_transactional:"facebook_checkbox_plugin_transactional",facebook_checkbox_plugin_promotional:"facebook_checkbox_plugin_promotional",file:"file",image_choices:"image_choices",product_variant:"product_variant"},CONTENT_TYPE:{form_data:"FORM_DATA",form_urlencoded:"X_WWW_FORM_URLENCODED",json:"JSON"},SORT_BY_TYPE:{asc:"asc",desc:"desc"},PRODUCT_VARIANT_TYPE:{combined:"combined",combobox:"combobox",label:"label"},PRODUCT_VARIANT_OPTION_TYPE:{color:1,image:2},PRODUCT_VARIANT_TITLE:{left:"left",top:"top"},FORM_THANKYOU_TYPE:{default:"default",url:"url",popup:"popup"},GAME_RESULT_TYPE:{default:"default",popup:"popup"},PERCENT_TRACKING_SCROLL:[0,25,50,75,100],TIME_ONPAGE_TRACKING:[10,30,60,120,180,300,600],FORM_CONFIG_TYPE:{email:"EMAIL",mail_chimp:"MAIL_CHIMP",infusion_soft:"INFUSION_SOFT",infusion_soft_ladi:"INFUSION_SOFT_LADI",active_campaign:"ACTIVE_CAMPAIGN",sendgrid:"SENDGRID",hubspot:"HUBSPOT",smtp:"SMTP",esms:"ESMS",get_response:"GET_RESPONSE",convertkit:"CONVERTKIT",ladiflow:"LADIFLOW",telegram:"TELEGRAM",slack:"SLACK",zalo_zns:"ZALO_ZNS",mautic:"MAUTIC",google_sheet:"GOOGLE_SHEET",google_form:"GOOGLE_FORM",custom_api:"CUSTOM_API",ladisales:"LADISALES",ladishare:"LADISHARE",haravan:"HARAVAN",sapo:"SAPO",shopify:"SHOPIFY",nhanh_vn:"NHANH_VN",google_recaptcha:"GOOGLE_RECAPTCHA",google_recaptcha_checkbox:"GOOGLE_RECAPTCHA_CHECKBOX",google_recaptcha_enterprise:"GOOGLE_RECAPTCHA_ENTERPRISE",google_places_autocomplete:"GOOGLE_PLACES_AUTOCOMPLETE",kiotviet:"KIOTVIET",wordpress:"WORDPRESS",metu:"METU",ladichat:"LADICHAT",shopping:"SHOPPING",blog:"BLOG",conversion_api:"CONVERSION_API",tiktok_conversion_api:"TIKTOK_CONVERSION_API",popupx:"POPUPX"},FORM_UPLOAD_FILE_LENGTH:20,FORM_UPLOAD_FILE_SIZE:25,CART_LAYOUT:{editable:"editable",viewonly:"viewonly"},WIDTH_SECTION_RESIZE:{},RESIZE_ADD_PIXEL:300,RESIZE_ADD_PIXEL_THUMB:50,RESIZE_RANGE:50,TOOLTIP_TYPE:{default:"default",info:"info",success:"success",error:"error",notice:"notice"},TOOLTIP_POSITION:{top_left:"top_left",top_middle:"top_middle",top_right:"top_right",bottom_left:"bottom_left",bottom_middle:"bottom_middle",bottom_right:"bottom_right",left_top:"left_top",left_middle:"left_middle",left_bottom:"left_bottom",right_top:"right_top",right_middle:"right_middle",right_bottom:"right_bottom"},TOOLTIP_SIZE:{small:"small",medium:"medium",big:"big"},OPTION_OTHER_KEY:"LADIPAGE_OTHER",STORY_PAGE:{horizontal:"horizontal",vertical:"vertical",none:"none"},COMBOBOX_TYPE:{delivery_method:"delivery_method"},PRODUCT_TYPE:{event:"Event",service:"Service",physical:"Physical",digital:"Digital",f_b:"F_B",combo:"COMBO",course:"Course"}},this.runtime={backdrop_popup_id:"backdrop-popup",backdrop_dropbox_id:"backdrop-dropbox",lightbox_screen_id:"lightbox-screen",builder_section_popup_id:"SECTION_POPUP",builder_section_background_id:"BODY_BACKGROUND",builder_popup_menu_mobile_id:"POPUP_MENU_MOBILE",ladipage_powered_by_classname:"ladipage_powered_by",current_element_mouse_down_image_compare:null,current_element_mouse_down_image_compare_position_x:0,mouse_down_diff_touch_action:10,current_element_mouse_down_carousel:null,current_element_mouse_down_carousel_position_x:0,current_element_mouse_down_carousel_position_y:0,current_element_mouse_down_carousel_diff:40,current_element_mouse_down_gallery_control:null,current_element_mouse_down_gallery_control_time:0,current_element_mouse_down_gallery_control_time_click:300,current_element_mouse_down_gallery_control_position_x:0,current_element_mouse_down_gallery_view:null,current_element_mouse_down_gallery_view_position_x:0,current_element_mouse_down_gallery_view_position_y:0,current_element_mouse_down_gallery_view_diff:40,country_state_sort:{VN:["201","202","224","220","203"]},location_state_sort:{VN:["HN","SG","HP","CT","DN"]},scroll_show_popup:{},scroll_depth:[],scroll_to_section:{},send_request_response:{},is_mobile_only:!1,interval_countdown:null,interval_gallery:null,timeout_gallery:{},interval_carousel:null,count_click_dom:{},timenext_carousel:{},time_click_dom:{},time_click:300,time_otp:6e4,time_delay_click_button:300,isGenerateHtml:!1,isClient:!1,isDesktop:!0,isBrowserDesktop:!0,isIE:!1,isLoadHtmlGlobal:!1,isYouTubeIframeAPIReady:!1,isLoadYouTubeIframeAPI:!1,isVideoButtonUnmute:!0,device:this.const.DESKTOP,ladipage_id:null,func_get_code_otp:{},list_scroll_func:{},list_loaded_func:[],list_show_popup_func:{},list_youtube_ready_exec:[],list_scrolling_exec:{},list_scrolled_exec:{},list_lightbox_id:{},list_set_value_name_country:["ward","district","state","country"],tmp:{},tabindexForm:0,eventData:{},eventDataGlobal:{},timenow:0,widthScrollBar:0,replaceStr:{},replacePrefixStart:"{{",replacePrefixEnd:"}}",replaceNewPrefixStart:"!::",replaceNewPrefixEnd:"::!"},this.const.WIDTH_SECTION_RESIZE[this.const.DESKTOP]=1440,this.const.WIDTH_SECTION_RESIZE[this.const.MOBILE]=768},"undefined"!=typeof window&&["isObject","isArray","isFunction","isBoolean","isString","isEmpty","isNull"].forEach(function(t){LadiPageScriptV2.prototype[t]=function(e){return window[t+"LadiPage"](e)}}),LadiPageScriptV2.prototype.copy=function(t){if("[object Object]"==Object.prototype.toString.call(t)){var e={};return Object.keys(t).forEach(i=>{e[i]=this.copy(t[i])}),e}if("[object Array]"==Object.prototype.toString.call(t)){var i=[];return t.forEach(t=>{i.push(this.copy(t))}),i}return t};var LadiPageScript=LadiPageScript||new LadiPageScriptV2;LadiPageScript.init();var LadiFormulaData={},LadiFormApi=LadiFormApi||{},LadiPageCommand=LadiPageCommand||[],LadiPageLocation=LadiPageLocation||[],LadiPageShopping=LadiPageShopping||[],LadiPageFormData=LadiPageFormData||[],LadiPageQueueCommandList=LadiPageQueueCommandList||[],LadiPageQueueCommand={push:function(t,e){isFunctionLadiPage(t)&&isFunctionLadiPage(e)&&(t()?e():LadiPageQueueCommandList.push({callback1:t,callback2:e}))}};LadiPageScriptV2.prototype.convertEventDataDevice=function(t,e){var i=this;if(isObjectLadiPage(e)){var a=null,n=null;Object.keys(e).forEach(function(o){o.toLowerCase().startsWith(i.const.DEVICE)&&(a=i.const.DESKTOP+o.substring(i.const.DEVICE.length),n=i.const.MOBILE+o.substring(i.const.DEVICE.length),e[a]=e[o],e[n]=e[o],delete e[o]),t&&o.toLowerCase().startsWith(i.const.DESKTOP)&&(n=i.const.MOBILE+o.substring(i.const.DESKTOP.length),e[n]=e[o]),!t&&o.toLowerCase().startsWith(i.const.MOBILE)&&(a=i.const.DESKTOP+o.substring(i.const.MOBILE.length),e[a]=e[o])})}return e},LadiPageScriptV2.prototype.loadHtmlGlobal=function(t,e){for(var i=this,a=0,n=[],o=document.querySelectorAll(".ladi-section[data-global-id]"),r=0;r0&&i.runtime.hasOwnProperty("cdn_url")&&i.runtime.hasOwnProperty("version")&&o.forEach(function(t){var e=i.runtime.cdn_url+t+".js?v="+i.runtime.version;i.loadScript(e,{defer:!0},null,function(t){i.runAfterLocation()})})};n.forEach(function(t){var e=t.id,n=document.getElementById(e),o=i.const.API_SECTION_GLOBAL_HTML.format(i.runtime.store_id,t.data_global_id);i.sendRequest("GET",o,null,!0,null,function(o,r,d){if(d.readyState==XMLHttpRequest.DONE){var l=document.createElement("div");if(l.innerHTML=o,isEmptyLadiPage(l.querySelector('div.ladi-section-global[data-id="'+t.id+'"] .ladi-section[data-global-id="'+t.data_global_id+'"]')))try{n.parentElement.removeChild(n)}catch(t){}else{var c=i.findAncestor(n,"ladi-section-global");isEmptyLadiPage(c)||(n=c);var u=function(t,e){var i=l.querySelector("style#"+t);isEmptyLadiPage(i)||i.parentElement.removeChild(i),i=l.querySelector("style#"+e),isEmptyLadiPage(i)||i.removeAttribute("media")};i.runtime.is_mobile_only||i.runtime.is_adaptive_design&&i.runtime.adaptive_design_is_mobile?u("style_section_global_desktop","style_section_global_mobile"):i.runtime.is_adaptive_design&&!i.runtime.adaptive_design_is_mobile&&u("style_section_global_mobile","style_section_global_desktop"),l=function(t){return isFunctionLadiPage(window.lazyload_run)&&(t=window.lazyload_run(t,!1,!1)),t.innerHTML}(l);try{var p=document.createRange().createContextualFragment(l);n.parentElement.replaceChild(p,n)}catch(t){n.outerHTML=l}}!function(t){a++;var e=document.querySelector('.ladi-section-global[data-id="'+t+'"] > script');if(isEmptyLadiPage(e))s();else{var n=null;try{n=JSON.parse(e.innerHTML),Object.keys(n).forEach(function(t){n[t]=i.deOptimizeEventData(i.copy(n[t]),i.const.OPTIMIZE_EVENT_DATA_KEY_LIST,"OPTIMIZE_EVENT_DATA_KEY_LIST"),n[t]=i.decodeValue(n[t])})}catch(t){}e.parentElement.removeChild(e),s(n)}}(e)}})}),s()},LadiPageScriptV2.prototype.checkHover=function(){var t="ladi_check_hover",e=document.getElementById(t);return isEmptyLadiPage(e)&&((e=document.createElement("div")).id=t,e.className="ladi-check-hover",e.style.setProperty("display","none","important"),document.body.appendChild(e)),0==getComputedStyle(e).opacity},LadiPageScriptV2.prototype.setLadiVariable=function(){for(var t=document.querySelectorAll("script."+this.const.SCRIPT_LADI_VARIABLE),e=0;e0&&(a+=n),e[t]=a,o++}),e},LadiPageScriptV2.prototype.optimizeEventData=function(t,e,i){var a=this,n=a.runtime.tmp["DATA_O_"+i];if(isArrayLadiPage(e)&&isNullLadiPage(n)){var o=[];"OPTIMIZE_EVENT_DATA_KEY_LIST"==i?(e.forEach(function(t){o.push(t),t.startsWith(a.const.DEVICE+".")&&(o.push(a.const.DESKTOP+t.substring(a.const.DEVICE.length)),o.push(a.const.MOBILE+t.substring(a.const.DEVICE.length)))}),o.push("type")):o=e,n=a.getOptimizeSourceKey(o),a.runtime.tmp["DATA_O_"+i]=n}isObjectLadiPage(t)&&Object.keys(t).forEach(function(e){-1==a.const.OPTIMIZE_EXCEPT_EVENT_DATA_KEY_LIST.indexOf(e)?isNullLadiPage(n[e])?t[e]=a.optimizeEventData(t[e],null,i):(t[n[e]]=a.optimizeEventData(t[e],null,i),delete t[e]):isNullLadiPage(n[e])||(t[n[e]]=t[e],delete t[e])});return isArrayLadiPage(t)&&t.forEach(function(e,n){t[n]=a.optimizeEventData(e,null,i)}),t},LadiPageScriptV2.prototype.deOptimizeEventData=function(t,e,i){var a=this,n=a.runtime.tmp["DATA_D_"+i];if(isArrayLadiPage(e)&&isNullLadiPage(n)){n={},a.optimizeEventData(null,e,i);var o=a.runtime.tmp["DATA_O_"+i];Object.keys(o).forEach(function(t){n[o[t]]=t}),a.runtime.tmp["DATA_D_"+i]=n}return isObjectLadiPage(t)&&Object.keys(t).forEach(function(e){-1==a.const.OPTIMIZE_EXCEPT_EVENT_DATA_KEY_LIST.indexOf(e)?isNullLadiPage(n[e])?t[e]=a.deOptimizeEventData(t[e],null,i):(t[n[e]]=a.deOptimizeEventData(t[e],null,i),delete t[e]):isNullLadiPage(n[e])||(t[n[e]]=t[e],delete t[e])}),isArrayLadiPage(t)&&t.forEach(function(e,n){t[n]=a.deOptimizeEventData(e,null,i)}),t},LadiPageScriptV2.prototype.postMessageWindow=function(t,e,i){t.postMessage(JSON.stringify(e),i)},LadiPageScriptV2.prototype.updateHeightElement=function(t,e,i,a,n,o){var r=this;if(a!=n){var d="style_update_height_element",l=!0;if("fixed"==getComputedStyle(e).position&&(l=!1),t){r.runtime.tmp.dimension_element_new={};var s="#"+r.runtime.builder_section_popup_id+" > .ladi-container > .ladi-element { max-height: none !important;}";r.createStyleElement(d,s)}for(var c,u,p=function(t,i){return t.id==e.id&&"height"==i?n:isEmptyLadiPage(r.runtime.tmp.dimension_element_new[t.id+i])?parseFloatLadiPage(getComputedStyle(t)[i])||0:r.runtime.tmp.dimension_element_new[t.id+i]},m=function(t,e,i){var a=p(t,e)+i;if(o){var n="transition-parent-collapse-"+e;t.classList.add(n);var d=1e3*parseFloatLadiPage(getComputedStyle(t).transitionDuration);r.runTimeout(function(){t.classList.remove(n)},d)}t.style.setProperty(e,a+"px"),r.runtime.tmp.dimension_element_new[t.id+e]=a},g=function(t){for(var e=[],i=0;i=y&&m(h,"top",_))}if(!isEmptyLadiPage(i)&&i.id!=r.runtime.builder_section_popup_id){var P=p(i,"height"),L=function(){for(var t=0,i=g(e),a=0;at&&(t=o)}}return t}();if((i.classList.contains("ladi-section")||i.getElementsByClassName("ladi-popup").length>0)&&(L=P+_),m(i,"height",L-P),l){var E=(c=i,u=r.findAncestor(c.parentElement,"ladi-element"),isEmptyLadiPage(u)&&(u=r.findAncestor(c.parentElement,"ladi-section")),u);this.updateHeightElement(!1,i,E,P,L,o)}}if(t){if(this.runtime.tmp.is_loaded_func_done){var A=document.getElementById(d);isEmptyLadiPage(A)||A.parentElement.removeChild(A)}delete r.runtime.tmp.dimension_element_new,r.runtime.tmp.is_window_resize||r.fireEvent(window,"resize",{set_viewport:!1})}}},LadiPageScriptV2.prototype.showParentVisibility=function(t,e){var i=this.findAncestor(t,"ladi-popup");if(!isEmptyLadiPage(i)&&(i=this.findAncestor(i,"ladi-element"),!isEmptyLadiPage(i)))return"none"==getComputedStyle(i).display&&i.classList.add("hide-visibility"),isFunctionLadiPage(e)&&e(),void i.classList.remove("hide-visibility");isFunctionLadiPage(e)&&e()},LadiPageScriptV2.prototype.pauseAllVideo=function(t){var e=document.getElementById(this.runtime.lightbox_screen_id).getElementsByClassName("lightbox-close")[0];if(!isEmptyLadiPage(e))return e.click(),this.pauseAllVideo(t);delete this.runtime.tmp.gallery_playing_video;for(var i=(t=t||document).querySelectorAll(".iframe-video-preload:not(.no-pause)"),a=0;a",n.className="button-unmute ladi-hidden",n.addEventListener("click",function(i){if(i.stopPropagation(),t=document.getElementById(t.id),e==c.const.VIDEO_TYPE.youtube){var a=!1;if(c.runtime.isYouTubeIframeAPIReady){var o=window.YT.get(t.id);!isEmptyLadiPage(o)&&isFunctionLadiPage(o.unMute)&&(o.unMute(),a=!0)}a||c.postMessageWindow(t.contentWindow,{event:"command",func:"unMute",args:[]},"*")}e==c.const.VIDEO_TYPE.direct&&(t.muted=!1),n.parentElement.removeChild(n),t.setAttribute("data-remove-button-unmute",!0)}),t.parentElement.appendChild(n)),i&&n.classList.remove("ladi-hidden");var o=c.findAncestor(t,"lightbox-screen");isEmptyLadiPage(o)||(n.style.setProperty("width",getComputedStyle(t).width),n.style.setProperty("height",getComputedStyle(t).height))}},m=document.getElementById(t);if(!isEmptyLadiPage(m)){var g=c.findAncestor(m,"ladi-video");isEmptyLadiPage(g)||(g=c.findAncestor(g,"ladi-element")),!a||o||isEmptyLadiPage(g)||(g.classList.add("pointer-events-none"),m.classList.add("no-pause")),r&&m.classList.add("ladi-hidden");var _="";if(!isEmptyLadiPage(g)){var y=g.getElementsByClassName("ladi-video-background")[0];if(!isEmptyLadiPage(y)){var f=getComputedStyle(y).backgroundImage;f.toLowerCase().startsWith('url("')&&f.toLowerCase().endsWith('")')&&(f=(f=f.substr('url("'.length)).substr(0,f.length-'")'.length),isEmptyLadiPage(f)||(_=f))}}if(e==c.const.VIDEO_TYPE.youtube){var v=c.getVideoId(e,i),h=function(){try{if(c.runtime.isLoadYouTubeIframeAPI&&c.runtime.isYouTubeIframeAPIReady||!isObjectLadiPage(window.YT)||!isFunctionLadiPage(window.YT.Player)||(c.runtime.isLoadYouTubeIframeAPI=!0,c.runtime.isYouTubeIframeAPIReady=!0),c.runtime.isLoadYouTubeIframeAPI||(c.runtime.isLoadYouTubeIframeAPI=!0,window.onYouTubeIframeAPIReady=function(){c.runtime.isYouTubeIframeAPIReady=!0;for(;c.runtime.list_youtube_ready_exec.length>0;)c.runtime.list_youtube_ready_exec.shift()()},c.loadScript("https://www.youtube.com/iframe_api")),!c.runtime.isYouTubeIframeAPIReady)return void c.runtime.list_youtube_ready_exec.push(h);m.outerHTML=m.outerHTML.replaceAll("",""),m=document.getElementById(t),n&&m.classList.add("opacity-0");var e=function(){n&&(m=document.getElementById(t)).classList.remove("opacity-0")},i=e,g=function(e){m=document.getElementById(t);var i=window.YT.get(t);isEmptyLadiPage(i)||isEmptyLadiPage(m)?c.runTimeout(g,100):(c.runResizeAll(),a||u?i.mute():i.unMute(),r||d||i.playVideo(),isFunctionLadiPage(s)&&s(),p(m))};new window.YT.Player(t,{videoId:v,playerVars:{rel:0,modestbranding:0,playsinline:n||a||l||u?1:0,controls:!n&&o?1:0},events:{onReady:g,onStateChange:function(i){if(i.data==window.YT.PlayerState.PLAYING){if(m=document.getElementById(t),n){var a=function(){window.YT.get(t).getCurrentTime()>=.1?e():c.runTimeout(a,100)};a()}p(m,!0);var o=document.getElementById(t+"_button_unmute");isEmptyLadiPage(o)||window.YT.get(t).mute()}i.data==window.YT.PlayerState.ENDED&&window.YT.get(t).playVideo()},onError:i}})}catch(t){}};h()}if(e==c.const.VIDEO_TYPE.direct){isEmptyLadiPage(_)||m.setAttribute("poster",_),m.setAttribute("preload","auto"),m.setAttribute("controlslist","nodownload"),m.setAttribute("loop",""),r||d||m.setAttribute("autoplay",""),(n||a||l||u)&&(m.setAttribute("playsinline",""),m.setAttribute("webkit-playsinline","")),!n&&o&&m.setAttribute("controls",""),a||u?m.setAttribute("muted",""):m.removeAttribute("muted"),n&&m.classList.add("opacity-0");var P=function(){n&&(m=document.getElementById(t)).classList.remove("opacity-0")};m.removeAttribute("src"),m.setAttribute("data-src",i),m.outerHTML=m.outerHTML.replaceAll("data-src=","src="),m=document.getElementById(t),isFunctionLadiPage(s)&&s(m),m.addEventListener("loadedmetadata",function(t){p(m)}),m.addEventListener("error",P),m.addEventListener("playing",function(t){if(n){var e=function(){m.currentTime>=.1?P():c.runTimeout(e,100)};e()}p(m,!0);var i=document.getElementById(m.id+"_button_unmute");isEmptyLadiPage(i)||(m.muted=!0)})}}},LadiPageScriptV2.prototype.playVideo=function(t,e,i,a,n,o){var r=document.getElementById(t);if(!isEmptyLadiPage(r)){var d=document.getElementById(t+"_player");if(o||n||this.pauseAllVideo(),isEmptyLadiPage(d)){var l=r.getElementsByClassName("ladi-video")[0],s=t+"_player";e==this.const.VIDEO_TYPE.youtube&&(l.innerHTML=l.innerHTML+'',this.runEventPlayVideo(s,e,i,n,!1,a,o)),e==this.const.VIDEO_TYPE.direct&&(l.innerHTML=l.innerHTML+'',this.runEventPlayVideo(s,e,i,n,!1,a,o))}else this.runEventReplayVideo(d.id,e,!0)}},LadiPageScriptV2.prototype.checkResizeImage=function(t){var e=[".jpg",".jpeg",".png"],i=function(t){for(var i=!1,a=0;al+1&&(d[l+1]=d[l+1].toLowerCase()),l=d.indexOf(this.const.STATIC_W_DOMAIN.toLowerCase()),this.checkResizeImage(t)&&-1!=l&&(d.length==l+3||d.length==l+6&&"ls"==d[3]&&"product"==d[5]||d.length==l+4&&"luid"==d[3]&&"avatar"==d[4]||d.length==l+4&&"rbg"==d[4])){var s=d[l+1].toLowerCase(),c=!0;if(s.startsWith("s")){var u=s.split("x");2==u.length&&parseFloatLadiPage(u[1])==u[1]&&(c=!1)}if(c){if(r||n){if(e=parseInt(e)||0,i=parseInt(i)||0,a){var p=this.const.RESIZE_RANGE+(o?this.const.RESIZE_ADD_PIXEL_THUMB:this.const.RESIZE_ADD_PIXEL);(e<=0||i<=0)&&(p*=2),e=e-e%this.const.RESIZE_RANGE+p,i=i-i%this.const.RESIZE_RANGE+p}}else e=this.const.WIDTH_SECTION_RESIZE[LadiPage.data.device_screen],i=this.const.WIDTH_SECTION_RESIZE[LadiPage.data.device_screen];d.insert(l+1,"s"+e+"x"+i)}}return t=d.join("/")},LadiPageScriptV2.prototype.historyReplaceState=function(t){try{window.history.replaceState(null,null,t)}catch(t){}},LadiPageScriptV2.prototype.resetViewport=function(){},LadiPageScriptV2.prototype.runStoryPage=function(){var t=this,e=t.runtime.story_page;if(isObjectLadiPage(e)){var i=document.getElementsByClassName("ladi-wraper")[0];if(!isEmptyLadiPage(i)){var a=document.getElementsByClassName("ladi-story-page-progress-bar")[0];isEmptyLadiPage(a)||a.parentElement.removeChild(a);var n=document.querySelectorAll('.ladi-section:not([id="'+this.runtime.builder_section_popup_id+'"]):not([id="'+this.runtime.builder_section_background_id+'"])');if(0!=n.length){(a=document.createElement("div")).className="ladi-story-page-progress-bar";for(var o=null,r=(n[0],function(e,i){e.addEventListener("click",function(e){e.stopPropagation(),t.removeTimeout(t.runtime.tmp.story_page_next_timeout_id),window.ladi(i.id,i).scroll()})}),d=0;d100?100:n,a.style.setProperty("width",n+"%"),n>=100&&(t.runtime.tmp.story_page_next_timeout_id=t.runTimeout(function(){isEmptyLadiPage(a.parentElement)||s(a.parentElement.nextElementSibling,!0)},i),i*=2)}t.runtime.tmp.story_page_timeout_id=t.runTimeout(c,i)}};s(o,!1),t.runtime.tmp.story_page_timeout_id=t.runTimeout(c,300),document.addEventListener("mousedown",function(e){t.runtime.tmp.story_page_mouse_down=!0}),document.addEventListener("touchstart",function(e){t.runtime.tmp.story_page_mouse_down=!0},t.runtime.scrollEventPassive),document.addEventListener("mouseup",function(e){t.runtime.tmp.story_page_mouse_down=!1}),document.addEventListener("touchend",function(e){t.runtime.tmp.story_page_mouse_down=!1}),i.addEventListener("scroll",function(a){isEmptyLadiPage(t.runtime.tmp.current_default_popup_id)&&(t.runtime.tmp.story_page_scroll=!0,t.removeTimeout(t.runtime.tmp.story_page_scroll_timeout_id),t.removeTimeout(t.runtime.tmp.story_page_timeout_id),t.runtime.tmp.story_page_scroll_timeout_id=t.runTimeout(function(){var a=0,n=e.type==t.const.STORY_PAGE.horizontal?i.scrollLeft/i.clientWidth:i.scrollTop/i.clientHeight;if((n=Math.floor(n+1.5))!=t.runtime.tmp.story_page_current_page){t.runtime.tmp.story_page_current_page=n;var o=document.querySelector(".ladi-story-page-progress-bar-item:nth-child("+n+")");t.removeTimeout(t.runtime.tmp.story_page_next_timeout_id),s(o,!1),a=100}t.runtime.tmp.story_page_scroll=!1,delete t.runtime.tmp.story_page_scroll_timeout_id,t.runtime.tmp.story_page_timeout_id=t.runTimeout(c,a)},300))},t.runtime.scrollEventPassive)}}}},LadiPageScriptV2.prototype.runThankyouPage=function(){var t=this,e=t.runtime.thankyou_page;if(isObjectLadiPage(e)){var i={is_custom:!0};i.conversion_name=e.event_value,i.google_ads_conversion=e.event_id,i.google_ads_label=e.event_label,i.purchase_value=e.purchase_value,i.event_category="LadiPageThankYouPage";var a=null;["phone","email"].forEach(function(e){var i=t.getDataReplaceStr(e);isEmptyLadiPage(i)||(isObjectLadiPage(a)||(a={}),a[e]=i)}),t.runEventTracking(null,i,a),delete t.runtime.thankyou_page}},LadiPageScriptV2.prototype.runResizeSectionBackground=function(){var t=this;t instanceof LadiPageScriptV2||(t=LadiPageScript);try{for(var e=document.querySelectorAll(".ladi-section .ladi-section-background iframe.ladi-section-background-video"),i=0;i .ladi-element"),a=0;a0;)i[0].classList.remove("ladi-lazyload")},LadiPageScriptV2.prototype.reloadLazyload=function(t){var e=this;if(e instanceof LadiPageScriptV2||(e=LadiPageScript),e.runtime.tmp.is_loaded_func_done){var i=[];if(t&&isObjectLadiPage(e.runtime.story_page)){var a=document.getElementsByClassName("ladi-section")[0];if(!isEmptyLadiPage(a))for(i=a.getElementsByClassName("ladi-lazyload");i.length>0;)i[0].classList.remove("ladi-lazyload")}else{i=document.getElementsByClassName("ladi-lazyload");for(var n=[],o=0;or&&r+i[o].offsetHeight>window.scrollY&&n.push(i[o])}n.forEach(function(t){t.classList.remove("ladi-lazyload")});for(var d=document.querySelectorAll(".ladi-gallery .ladi-gallery-view-item.selected:not(.ladi-lazyload)"),l=0;l0;)s[0].classList.remove("ladi-lazyload")}}}},LadiPageScriptV2.prototype.documentLoaded=function(){var t=this;if(t instanceof LadiPageScriptV2||(t=LadiPageScript),LadiPageApp.review_callback_loaded(!0,t.documentLoaded)){t.const.LANG=JSON.stringify(t.const.LANG),t.const.LANG=t.convertReplacePrefixStr(t.const.LANG),t.const.LANG=JSON.parse(t.const.LANG),t.runtime.tmp.lang_loaded=!0;var e=t.getURLSearchParams(null,null,!0),i=e.ladishow,a=e.ladihide,n=e.laditop,o=window.location.hash;isEmptyLadiPage(i)?i=[]:isArrayLadiPage(i)||(i=i.split(",").removeSpace()),isEmptyLadiPage(a)?a=[]:isArrayLadiPage(a)||(a=a.split(",").removeSpace()),isEmptyLadiPage(n)?n=[]:isArrayLadiPage(n)||(n=n.split(",").removeSpace().reverse());try{var r=window.ladi("LADI_CAMP_END_DATE").get_cookie(),d=window.ladi("LADI_CAMP_CONFIG").get_cookie();if(!isEmptyLadiPage(r)&&!isEmptyLadiPage(d)){d=JSON.parse(Base64.decode(d));var l=((r=parseInt(r)||0)-Date.now())/24/60/60/1e3;if(l>0&&isArrayLadiPage(d.dynamic_content.cookie)){var s=[];d.dynamic_content.cookie.forEach(function(t){var e=t.split("=");2!=(e=e.removeSpace()).length||isEmptyLadiPage(e[0])||isEmptyLadiPage(e[1])||s.push({name:e[0],value:e[1]})}),s.forEach(function(t){window.ladi(t.name).set_cookie(t.value,l)})}a=d.dynamic_content.hide||[],i=d.dynamic_content.show||[],n=d.dynamic_content.top||[],isArrayLadiPage(d.dynamic_content.scroll)&&d.dynamic_content.scroll.length>0&&(o="#"+d.dynamic_content.scroll.pop())}}catch(t){}var c=null,u=[];if(i.forEach(function(t){var e=document.getElementById(t);isEmptyLadiPage(e)||e.getElementsByClassName("ladi-popup").length>0&&u.push(t)}),u.length>0&&!isEmptyLadiPage(o))try{c=document.querySelector(o),isEmptyLadiPage(c)||isEmptyLadiPage(c.id)||!c.classList.contains("ladi-section")||(o=null,i=i.except(u),t.runTimeout(function(){window.ladi(c.id).scroll(!1,!0),u.forEach(function(t){window.ladi(t).show()})},300))}catch(t){}if(a.forEach(function(t){window.ladi(t).hide()}),i.forEach(function(t){window.ladi(t).show()}),n.forEach(function(t){window.ladi(t).top()}),!isEmptyLadiPage(o))try{c=document.querySelector(o),isEmptyLadiPage(c)||isEmptyLadiPage(c.id)||t.runTimeout(function(){window.ladi(c.id).scroll()},300)}catch(t){}if(t.resetViewport(),t.runEventScroll(),!isEmptyLadiPage(t.runtime.tracking_global_url)){var p=!1,m=window;isObjectLadiPage(t.runtime.story_page)&&(m=document.getElementsByClassName("ladi-wraper")[0]);var g=function(){p||(p=!0,t.loadScript(t.runtime.tracking_global_url+"?v="+Date.now(),{defer:!0},null,function(){t.runtime.tmp.tracking_global_loaded=!0}),m.removeEventListener("scroll",g),document.removeEventListener("mousemove",g),document.removeEventListener("touchstart",g))};m.addEventListener("scroll",g,t.runtime.scrollEventPassive),document.addEventListener("mousemove",g),document.addEventListener("touchstart",g,t.runtime.scrollEventPassive),t.runTimeout(g,t.runtime.tracking_global_delay)}for(;t.runtime.list_loaded_func.length>0;){t.runtime.list_loaded_func.shift()()}t.runtime.tmp.is_loaded_func_done=!0;var _=document.getElementById("style_update_height_element");isEmptyLadiPage(_)||_.parentElement.removeChild(_);var y=document.getElementById("style_animation");isEmptyLadiPage(y)||y.parentElement.removeChild(y),t.reloadLazyload(!1)}},LadiPageScriptV2.prototype.runConversionApi=function(t,e,i,a){var n=this;a=isObjectLadiPage(a)?a:{},isFunctionLadiPage(n.runtime.tmp.runTrackingAnalytics)?LadiPageQueueCommand.push(function(){return"facebook"==t?isFunctionLadiPage(window.fbq):"tiktok"==t?!isNullLadiPage(window.ttq):void 0},function(){if(!isEmptyLadiPage(t)&&!isEmptyLadiPage(e)&&isObjectLadiPage(window.ladi_conversion_api)&&isObjectLadiPage(window.ladi_conversion_api[t])&&(window.ladi_conversion_api[t][e]=i),isObjectLadiPage(window.ladi_conversion_api)&&isObjectLadiPage(window.ladi_conversion_api[t])&&isArrayLadiPage(window.ladi_conversion_api[t].pixels)&&isArrayLadiPage(window.ladi_conversion_api[t].events)){window.ladi_conversion_api[t].pixels=window.ladi_conversion_api[t].pixels.unique();var o=Date.now()+3e3,r=function(t,e){var i=[],a=!0;t.forEach(function(t){var e=window.ladi(t).get_cookie();isEmptyLadiPage(e)&&(a=!1),i.push(e)}),!a&&Date.now()0?window.innerWidth:window.screen.width:window.outerWidth>0?window.outerWidth:window.screen.width},LadiPageScriptV2.prototype.getHeightDevice=function(t){return window.outerHeight>0&&!this.runtime.isDesktop&&(t&&window.outerHeight>window.innerHeight||!t&&window.innerHeight>window.outerHeight)?window.outerHeight:window.innerHeight},LadiPageScriptV2.prototype.startAutoScroll=function(t,e,i,a){if(this.runtime.isDesktop?i:a){var n=document.getElementById(t);if(!isEmptyLadiPage(n)&&!n.classList.contains("ladi-auto-scroll")){var o=0;if("section"!=e){if((parseFloatLadiPage(getComputedStyle(n).width)||0)<=this.getWidthDevice())return;o=(o=parseFloatLadiPage(getComputedStyle(n).left)||0)>0?0:-1*o}else{for(var r=n.querySelectorAll(".ladi-container > .ladi-element"),d=0;d0?0:-1*o,n.querySelector(".ladi-container").style.setProperty("margin-left",o+"px")}n.classList.add("ladi-auto-scroll"),n.scrollLeft=o}}},LadiPageScriptV2.prototype.getLinkUTMRedirect=function(t,e){var i=this.createTmpElement("a","",{href:t}),a=this.getURLSearchParams(e,null,!1),n=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"];if(n.push(this.const.LADIFLOW_DATA_KEY_NAME),n.push(this.const.REF_NAME),!isEmptyLadiPage(i.href)&&!isEmptyLadiPage(i.host)){var o=this.getURLSearchParams(i.search,null,!1),r=[];isArrayLadiPage(window.LadiPageURLSearchParamsCustom)&&(r=window.LadiPageURLSearchParamsCustom),isStringLadiPage(window.LadiPageURLSearchParamsCustom)&&(r=[window.LadiPageURLSearchParamsCustom]),(n=(n=n.concat(r)).unique()).forEach(function(t){isEmptyLadiPage(o[t])&&!isEmptyLadiPage(a[t])&&(i.search=i.search+(isEmptyLadiPage(i.search)?"?":"&")+t+"="+encodeURIComponent(a[t]),o[t]=a[t])})}return i.href},LadiPageScriptV2.prototype.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},LadiPageScriptV2.prototype.randomString=function(t){for(var e="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",a=i.length,n=0;n0)return setTimeout(t,e);t()}},LadiPageScriptV2.prototype.removeTimeout=function(t){return clearTimeout(t)},LadiPageScriptV2.prototype.removeInterval=function(t){return clearInterval(t)},LadiPageScriptV2.prototype.runInterval=function(t,e){if(isFunctionLadiPage(t))return setInterval(t,e)},LadiPageScriptV2.prototype.getURLSearchParams=function(t,e,i){var a={},n=isNullLadiPage(t);if(t=n?window.location.search:t,!isEmptyLadiPage(t))for(var o=t.substr(1).split("&"),r=0;r0&&(r.runtime.tmp.send_request_configs[r.const.API_FORM_DATA]={timeout:r.const.API_FORM_DATA_TIMEOUT,list:e}),void l()}d(t)};l()},LadiPageScriptV2.prototype.sendRequestWithOption=function(t,e,i,a,n,o,r){if(!this.runtime.isGenerateHtml){if(this.runtime.has_popupx&&this.runtime.request_through_parent){var d=this.randomId();return this.runtime.tmp["request_callback_id_"+d]=r,void this.runtime.tmp.runActionPopupX({request_data:{method:t,url:e,data:i,async:a,headers:n,options:o,callback_id:d},action:{type:"send_request_with_option"}})}var l=new XMLHttpRequest;if(isFunctionLadiPage(this.runtime.send_request_response[e])){var s=this.runtime.send_request_response[e](e,i,r);if(!0===s)return;i=s}isFunctionLadiPage(r)&&(l.onreadystatechange=function(){var t=null;try{t=this.responseText}catch(t){}r(t,this.status,this,e)}),l.open(t,e,a);isObjectLadiPage(n)&&Object.keys(n).forEach(function(t){l.setRequestHeader(t,n[t])}),isObjectLadiPage(o)&&Object.keys(o).forEach(function(t){l[t]=o[t]}),l.send(i)}},LadiPageScriptV2.prototype.setCookieDomains=function(t,e,i){window.ladi(t).set_cookie(e,i,"/",window.location.host),isArrayLadiPage(this.runtime.DOMAIN_SET_COOKIE)&&this.runtime.DOMAIN_SET_COOKIE.forEach(function(a){a!=window.location.host&&window.ladi(t).set_cookie(e,i,"/",a)})},LadiPageScriptV2.prototype.removeCookieDomains=function(t){window.ladi(t).set_cookie(null,-365,"/",window.location.host),isArrayLadiPage(this.runtime.DOMAIN_SET_COOKIE)&&this.runtime.DOMAIN_SET_COOKIE.forEach(function(e){e!=window.location.host&&window.ladi(t).set_cookie(null,-365,"/",e)})},LadiPageScriptV2.prototype.deleteCookie=function(t){return window.ladi(t).delete_cookie()},LadiPageScriptV2.prototype.setCookie=function(t,e,i,a,n,o){return window.ladi(e).set_cookie(i,a,o,t,n)},LadiPageScriptV2.prototype.getCookie=function(t){return window.ladi(t).get_cookie()},LadiPageScriptV2.prototype.convertDataDate=function(t,e){function i(t){return(t>=10?"":"0")+t}return e.forEach(function(e){try{var a=new Date(t[e]);a.toISOString()==t[e]&&(t[e]=a.getFullYear()+"-"+i(a.getMonth()+1)+"-"+i(a.getDate())+" "+i(a.getHours())+":"+i(a.getMinutes())+":"+i(a.getSeconds()))}catch(t){}}),t},LadiPageScriptV2.prototype.runFormItemOtherChange=function(t,e){var i=this,a=i.findAncestor(t,"ladi-element");if(!isEmptyLadiPage(a)){var n=function(i){var n=null;if(e)for(var o=a.querySelectorAll('.ladi-form-checkbox-item input[data-other="true"]'),d=0;d0;)V=b.shift(),o.fireEvent(V,"change");for(;T.length>0;)V=T.shift(),o.runtime.tmp.fireEventLabelChange(V);for(w=document.querySelectorAll(".ladi-form .ladi-form-label-container"),S=0;S0){var r=n?0:l.getProductVariantIndex(null,a);isEmptyLadiPage(o)||(r=u.product.variants.findIndex(function(t){return t.product_variant_id==o}));var y=null;if(-1!=r&&(y=u.product.variants[r],p=y),!t)if(-1!=r)if(-1!=["variant_start_date","variant_end_date"].indexOf(c))g=LadiPageScript.convertDataDate({date:y[c]},["date"]),m=g.date,e=m;else if(-1!=["sku","variant_timezone"].indexOf(c))m=y[c],e=m;else if(-1!=["title"].indexOf(c))m=y[c]||y.product_name,e=m;else if(-1!=["text_quantity"].indexOf(c))m=1==y.inventory_checked?y[c]:"",e=m;else if(-1!=["weight"].indexOf(c))m=y[c],isEmptyLadiPage(y.weight_unit)||(m+=y.weight_unit),e=m;else if(-1!=["price","compare_price"].indexOf(c))isEmptyLadiPage(y[c])?m="":(m=l.formatNumber(y[c],3),isObjectLadiPage(u.store_info)&&isObjectLadiPage(u.store_info.currency)&&!isEmptyLadiPage(u.store_info.currency.symbol)&&(m=l.formatCurrency(y[c],u.store_info.currency.symbol,!0))),e=m;else if(-1!=["price_sale"].indexOf(c)){var f=0;isEmptyLadiPage(y.price)||isEmptyLadiPage(y.compare_price)||(f=y.compare_price-y.price),0!=f?(m=l.formatNumber(f,3),isObjectLadiPage(u.store_info)&&isObjectLadiPage(u.store_info.currency)&&!isEmptyLadiPage(u.store_info.currency.symbol)&&(m=l.formatCurrency(f,u.store_info.currency.symbol,!0))):m="",e=m}else if(-1!=["price_sale_percent"].indexOf(c)){var v=0;isEmptyLadiPage(y.price)||isEmptyLadiPage(y.compare_price)||(v=Math.floor((y.compare_price-y.price)/y.compare_price*100)),e=m=0!=v?v+"%":""}else if(-1!=["src"].indexOf(c)){if(m=y[c],isEmptyLadiPage(m))return c="image",_();!isStringLadiPage(m)||m.startsWith("http://")||m.startsWith("https://")||m.startsWith("//")||(m="https://"+l.const.STATIC_W_DOMAIN+"/"+m),e=m}else["description"].indexOf(c),m=y[c],isEmptyLadiPage(m)||(e=m);else e=m=""}}else m=u.product[c],isBooleanLadiPage(m)?m=m?l.const.LANG.OPTION_TRUE:l.const.LANG.OPTION_FALSE:(g=LadiPageScript.convertDataDate({date:m},["date"]),m=g.date),e=m;!i&&isFunctionLadiPage(d)&&d(e)};_()}return t?{product:u,variant:p,value:e}:e},LadiPageScriptV2.prototype.generateVariantProduct=function(t,e,i,a,n,o,r,d,l){var s=e?"":null,c=this,u=function(t){if(!e)return isObjectLadiPage(t)?t:null;var d="";if(isObjectLadiPage(t)){if(!isObjectLadiPage(t.product))return d;i==c.const.PRODUCT_VARIANT_TYPE.combined&&(d+='
",c.runtime.isClient&&(d+='"),isArrayLadiPage(t.product.variants)&&t.product.variants.forEach(function(e,i){var a=e.title||e.product_name;if(n){var o=c.formatNumber(e.price,3);isObjectLadiPage(t.store_info)&&isObjectLadiPage(t.store_info.currency)&&!isEmptyLadiPage(t.store_info.currency.symbol)&&(o=c.formatCurrency(e.price,t.store_info.currency.symbol,!0)),a+=" - "+o}d+='"}),d+="
"),i==c.const.PRODUCT_VARIANT_TYPE.combobox&&isArrayLadiPage(t.product.options)&&t.product.options.forEach(function(e){if(e.is_tmp)d+='
';else if(isArrayLadiPage(e.values)&&0!=e.values.length){d+='
',isEmptyLadiPage(a)||(d+='
'+e.name+"
"),d+='
",c.runtime.isClient&&(d+='");var i=null;isArrayLadiPage(t.product.variants)&&(i=t.product.variants[0]);var n=null;isEmptyLadiPage(i)||isStringLadiPage(i.option_ids)&&(n=i.option_ids.split("/"));e.values.forEach(function(t){var a=function(t){var a="";return isArrayLadiPage(n)&&n.forEach(function(n,o){e.product_option_id==n&&t==i["option"+(o+1)]&&(a=" selected")}),a}(t.name);d+="'+(t.name_new||t.name)+""}),d+="
"}}),i==c.const.PRODUCT_VARIANT_TYPE.label&&isArrayLadiPage(t.product.options)&&t.product.options.forEach(function(e){if(isArrayLadiPage(e.values)&&0!=e.values.length){d+='
',isEmptyLadiPage(a)||(d+='
',d+=""+e.name+"",d+=''+(r?"":e.values[0].name)+"",d+="
"),d+='
';var i=null;isArrayLadiPage(t.product.variants)&&(i=t.product.variants[0]);var n=null;isEmptyLadiPage(i)||isStringLadiPage(i.option_ids)&&(n=i.option_ids.split("/"));e.values.forEach(function(t,a){0==a&&(t.type==c.const.PRODUCT_VARIANT_OPTION_TYPE.image?d+='
':t.type==c.const.PRODUCT_VARIANT_OPTION_TYPE.color?d+='
':d+='
 
');var o=function(t){var a="";return isArrayLadiPage(n)&&n.forEach(function(n,o){e.product_option_id==n&&t==i["option"+(o+1)]&&(a=" selected")}),a}(t.name);if(t.type==c.const.PRODUCT_VARIANT_OPTION_TYPE.image){var r=t.value;isEmptyLadiPage(r)||!isStringLadiPage(r)||r.startsWith("http://")||r.startsWith("https://")||r.startsWith("//")||(r="https://"+c.const.STATIC_W_DOMAIN+"/"+r),r=c.getOptimizeImage(r,100,100,!1,!1,!1,!0),d+=`
'}else t.type==c.const.PRODUCT_VARIANT_OPTION_TYPE.color?d+='
':d+='
'+(t.name_new||t.name)+"
"}),d+="
"}})}return d};if(!isNullLadiPage(t.dataProduct))return u(t.dataProduct);var p=t["option.form_account_id"],m=t["option.product_type"],g=t["option.ladisale_store_id"]||null,_=t["option.product_id"],y=t["option.data_setting.value"],f=t["option.data_setting.type_dataset"],v=t["option.data_setting.sort_name"],h=t["option.data_setting.sort_by"],P=null,L=null;if(-1!=[c.const.FORM_CONFIG_TYPE.ladisales,c.const.FORM_CONFIG_TYPE.sapo,c.const.FORM_CONFIG_TYPE.haravan,c.const.FORM_CONFIG_TYPE.shopify,c.const.FORM_CONFIG_TYPE.wordpress].indexOf(m)){if(!isEmptyLadiPage(_)){isEmptyLadiPage(c.runtime.tmp.product_info[m])&&(c.runtime.tmp.product_info[m]={}),isEmptyLadiPage(c.runtime.tmp.timeout_product_info[m])&&(c.runtime.tmp.timeout_product_info[m]={});var E=_;if(_=parseInt(_)||_,P=c.runtime.tmp.product_info[m][_],L=function(){return u(P)},isNullLadiPage(P)){c.runtime.tmp.product_info[m][_]=!0;var A=function(){c.runtime.tmp.product_info[m][_]=!1,isEmptyLadiPage(c.runtime.tmp.timeout_product_info[m][_])||(c.removeTimeout(c.runtime.tmp.timeout_product_info[m][_]),delete c.runtime.tmp.timeout_product_info[m][_])},b=function(t){if(P=isObjectLadiPage(c.runtime.tmp.product_info[m][_])?c.runtime.tmp.product_info[m][_]:t.data,isObjectLadiPage(P)){if(!isObjectLadiPage(P.store_info)){var e=c.runtime.currency;c.runtime.isClient||(e=window.$rootScope.getStoreCurrency()),P.store_info={currency:{code:e,symbol:c.formatCurrency(null,e,!1,!0)}}}if(m!=c.const.FORM_CONFIG_TYPE.ladisales&&(P.store_info.id=-1),isObjectLadiPage(P.store_info.currency)&&!isEmptyLadiPage(P.store_info.currency.code)&&(P.store_info.currency.symbol=c.formatCurrency(null,P.store_info.currency.code,!1,!0)),isObjectLadiPage(P.product)&&isArrayLadiPage(P.product.options)&&isArrayLadiPage(P.product.variants)){var i=P.product.options.map(function(t){return t.product_option_id});if(i=i.join("/"),-1!=[c.const.FORM_CONFIG_TYPE.ladisales].indexOf(m)&&1==P.product.options.length&&isObjectLadiPage(P.product.options[0])&&isArrayLadiPage(P.product.options[0].values)&&P.product.variants.length==P.product.options[0].values.length&&(P.product.type==c.const.PRODUCT_TYPE.event||P.product.type==c.const.PRODUCT_TYPE.service)){for(var a=[],n=0;n0&&n.push(this.const.LANG.HIDE_ELEMENT+" "+t.dynamic_content.hide.join(", ")),isArrayLadiPage(t.dynamic_content.show)&&t.dynamic_content.show.length>0&&n.push(this.const.LANG.SHOW_ELEMENT+" "+t.dynamic_content.show.join(", ")),isArrayLadiPage(t.dynamic_content.top)&&t.dynamic_content.top.length>0&&n.push(this.const.LANG.TOP_ELEMENT+" "+t.dynamic_content.top.join(", ")),isArrayLadiPage(t.dynamic_content.scroll)&&t.dynamic_content.scroll.length>0&&n.push(this.const.LANG.SCROLL_ELEMENT+" "+t.dynamic_content.scroll.join(", ")),isArrayLadiPage(t.dynamic_content.cookie)&&t.dynamic_content.cookie.length>0&&n.push(this.const.LANG.SET_COOKIE+" "+t.dynamic_content.cookie.join("; ")))}catch(t){}return a?n:n.join(i)},LadiPageScriptV2.prototype.checkDataTypeWebsiteValue=function(t){return t==this.const.DATA_TYPE.list_category||t==this.const.DATA_TYPE.list_tag||t==this.const.DATA_TYPE.list_post_by_category||t==this.const.DATA_TYPE.list_post_by_tag||t==this.const.DATA_TYPE.list_post_by_keyword},LadiPageScriptV2.prototype.loadCollectionData=function(t,e,i,a,n,o){var r=this,d=function(t,e,i,a,n,o){var l=!isEmptyLadiPage(e["option.product_mapping_name"]),s=JSON.stringify(e),c=null,u=null;if(l)if(a&&isEmptyLadiPage(i))c="";else if(!isEmptyLadiPage(e["option.product_id"])&&s===(c=(u=r.generateProductKey(!0,s,!0,e,!0,i,null,function(r){d(t,e,i,a,n,o)})).value))return;var p=e.type,m=null,g=null;if(l&&"headline"==p&&(g=t.getElementsByClassName("ladi-headline")[0],isEmptyLadiPage(g)||(g.innerHTML=isNullLadiPage(c)?"":c)),l&&"paragraph"==p&&(g=t.getElementsByClassName("ladi-paragraph")[0],isEmptyLadiPage(g)||(g.innerHTML=isNullLadiPage(c)?"":c)),l&&"image"==p){m=r.getOptimizeImage(c,t.clientWidth,t.clientHeight,!0,!1,!1,!0);var _=t.getElementsByClassName("ladi-image-background")[0];isEmptyLadiPage(_)||(isEmptyLadiPage(m)?_.style.setProperty("background-image","none"):_.style.setProperty("background-image",'url("'+m+'")'))}if("gallery"==p){if(l&&!isArrayLadiPage(c))return;if(o&&!n&&"true"==t.getAttribute("data-collection"))return void r.runtime.tmp.updateImageGalleryProduct(t,u,e);t.setAttribute("data-collection",!0),t.removeAttribute("data-stop"),t.removeAttribute("data-loaded"),t.removeAttribute("data-scrolled"),t.removeAttribute("data-current"),t.removeAttribute("data-is-next"),t.removeAttribute("data-runtime-id"),t.removeAttribute("data-next-time");var y=t.querySelector(".ladi-gallery-view-item.selected");isEmptyLadiPage(y)||y.classList.remove("selected");var f=t.querySelector(".ladi-gallery-control-item.selected");isEmptyLadiPage(f)||f.classList.remove("selected");var v=t.getElementsByClassName("ladi-gallery-view")[0];f=t.getElementsByClassName("ladi-gallery-control-item")[0],y=t.getElementsByClassName("ladi-gallery-view-item")[0],isEmptyLadiPage(y)||y.classList.add("selected"),isEmptyLadiPage(f)||f.classList.add("selected");var h=t.getElementsByClassName("ladi-gallery-control-box")[0];if(isEmptyLadiPage(h)||h.style.removeProperty("left"),l){for(var P=t.getElementsByClassName("ladi-gallery-view-item");P.length',null,!0);t.getElementsByClassName("ladi-gallery-view")[0].appendChild(L)}for(;P.length>c.length;)P[P.length-1].parentElement.removeChild(P[P.length-1]);for(var E=t.getElementsByClassName("ladi-gallery-control-item"),A=function(e){r.runtime.tmp.eventClickGalleryControlItem(e,t)};E.length',null,!0);b.addEventListener("click",A),t.getElementsByClassName("ladi-gallery-control-box")[0].appendChild(b)}for(;E.length>c.length;)E[E.length-1].parentElement.removeChild(E[E.length-1]);for(var T=t.querySelectorAll(".ladi-gallery .ladi-gallery-view .ladi-gallery-view-arrow"),w=0;w .ladi-gallery-control"),w=0;w .ladi-gallery-view"),w=0;w0&&t!=n)){e.style.setProperty("height",n+"px");var A=r.findAncestor(e,"ladi-form");isEmptyLadiPage(A)||(A=r.findAncestor(A,"ladi-element"),r.updateHeightElement(!0,e,A,t,n))}})}if(a["option.input_type"]==r.const.INPUT_TYPE.number){var g=e.querySelector('input[name="quantity"]'),_=function(t){if(!isEmptyLadiPage(t.target.value)){var e=r.generateVariantProduct(i,!1,null,null,null,null,!0,!0,function(){_(t)});if(!(isEmptyLadiPage(e)||isEmptyLadiPage(e.store_info)||isEmptyLadiPage(e.product))){var a=t.target;a=(a=r.findAncestor(a,"ladi-form")).querySelector('[data-variant="true"]');var n=r.getProductVariantId(a,e.product),o=e.product.variants.findIndex(function(t){return t.product_variant_id==n});if(-1!=o){var d=e.product.variants[o].quantity,l=e.product.variants[o].quantity_stock;d=isNullLadiPage(l)?d:l;var s=parseInt(t.target.value)||0,c=1;c=e.product.variants[o].min_buy||c;var u=e.product.variants[o].max_buy,p=0,m=r.runtime.tmp.cart.findIndex(function(t){return t.product_id==e.product.variants[o].product_id&&t.product_variant_id==e.product.variants[o].product_variant_id});-1!=m&&(p=r.runtime.tmp.cart[m].quantity),c>s+p&&(s=c-p),1==e.product.variants[o].inventory_checked&&s+p>d&&(s=d-p),!isEmptyLadiPage(u)&&s+p>u&&(s=u-p),s=s<1?1:s,t.target.setAttribute("min",c),isEmptyLadiPage(u)||t.target.setAttribute("max",u),t.target.value=s}}}};g.addEventListener("input",_),r.fireEvent(g,"input");var y=e.querySelectorAll(".button")[0],f=e.querySelectorAll(".button")[1];if(isEmptyLadiPage(y)||isEmptyLadiPage(f))return;y.addEventListener("click",function(t){r.removeTimeout(r.runtime.tmp.timeout_button_quantity_cart_id),r.runtime.tmp.timeout_button_quantity_cart_id=r.runTimeout(function(){g.value=(parseFloatLadiPage(g.value)||0)-1,r.fireEvent(g,"input")},10)}),f.addEventListener("click",function(t){r.removeTimeout(r.runtime.tmp.timeout_button_quantity_cart_id),r.runtime.tmp.timeout_button_quantity_cart_id=r.runTimeout(function(){g.value=(parseFloatLadiPage(g.value)||0)+1,r.fireEvent(g,"input")},10)})}if("button"==a.type&&(a["option.is_buy_now"]||a["option.is_add_to_cart"])){var v=function(){var t=i["option.data_event"];if(!isArrayLadiPage(t)&&(t=[],isObjectLadiPage(i["option.data_action"]))){var a=r.copy(i["option.data_action"]);a.action_type=r.const.ACTION_TYPE.action,t.push(a)}t.forEach(function(t){t.action_type==r.const.ACTION_TYPE.action&&(t.type==r.const.DATA_ACTION_TYPE.popup_cart&&(window.ladi("POPUP_CART").show(),r.runEventTracking(e.id,{is_form:!1})),t.type==r.const.DATA_ACTION_TYPE.popup_checkout&&(r.runtime.shopping_third_party?r.getThirdPartyCheckoutUrl(!0,null,{event:{target:e}}):window.ladi("POPUP_CHECKOUT").show(!1,{event:{target:e}}),r.runEventTracking(e.id,{is_form:!1})))})};e.setAttribute("data-click",!1),e.addEventListener("click",function(t){r.runtime.tmp.buttonAddToCartClick(t,!0,i,v)})}},L=function(t,e){var g=f*v;r.checkDataTypeWebsiteValue(p)&&isEmptyLadiPage(u)&&(y!=r.const.COLLECTION_LIST_TYPE.horizontal&&y!=r.const.COLLECTION_LIST_TYPE.vertical||(g=1e3));var _=null;if(_=r.getListProductByTagId(e,g,i,!0,function(){L(t,e)}),isObjectLadiPage(_)&&isArrayLadiPage(_.products)){var E=m.getElementById(t);if(isEmptyLadiPage(E))return;if(E.getAttribute("data-page")==i&&1!=i)return;var A=i,b=!1,T=!1;if(!isEmptyLadiPage(_.total_record)&&i*g>=_.total_record){if(u==r.const.COLLECTION_TYPE.readmore){var w=E.getElementsByClassName("ladi-collection-button-next")[0];isEmptyLadiPage(w)||w.setAttribute("data-opacity","0")}E.setAttribute("data-max-page",A),b=!0,i*g>_.total_record&&(T=!0)}E.setAttribute("data-page",i>A?A:i);var S=E.getElementsByClassName("ladi-collection-arrow-left")[0],O=E.getElementsByClassName("ladi-collection-arrow-right")[0],C=E.getElementsByClassName("ladi-collection-button-next")[0];if(isEmptyLadiPage(S)||S.classList.remove("opacity-0"),isEmptyLadiPage(O)||O.classList.remove("opacity-0"),isEmptyLadiPage(C)||C.classList.remove("opacity-0"),1==E.getAttribute("data-page")&&u==r.const.COLLECTION_TYPE.carousel&&(isEmptyLadiPage(S)||S.classList.add("opacity-0")),E.getAttribute("data-page")==E.getAttribute("data-max-page")&&(u==r.const.COLLECTION_TYPE.readmore&&(isEmptyLadiPage(C)||C.classList.add("opacity-0")),u==r.const.COLLECTION_TYPE.carousel&&(isEmptyLadiPage(O)||O.classList.add("opacity-0"))),AN&&(N=D.length)}}var R=E.getElementsByClassName("ladi-collection-content")[0],B={className:I[0].className,innerHTML:I[0].innerHTML};a&&I[0].parentElement.removeChild(I[0]);for(var F=R.getElementsByClassName("ladi-collection-page");F.length0;)V[0].parentElement.removeChild(V[0]);var Y=function(t,i,a,n,u,p){isEmptyLadiPage(i.id)&&!isEmptyLadiPage(i.product_id)&&(i.id=i.product_id);for(var m=0;mN&&(N=_.products[k].options.length);for(E.setAttribute("data-max-option-length",N),k=0;k<_.products.length;k++)if(!(V.length>k)){var j=document.createElement("div");j.className=B.className,M.appendChild(j),j.innerHTML=B.innerHTML;for(var U=j.getElementsByClassName("ladi-element");isArrayLadiPage(_.products[k].options)&&_.products[k].options.length0?(n="calc("+a+" * "+d.length+" - ("+a+" / "+v+" * "+s+") + calc("+h+"px / "+v+" * "+l.length+"))",o>1&&(o!=d.length?i="calc(-"+a+" * "+(o-1)+")":(i="calc(-"+a+" * "+(o-1)+" + ("+a+" / "+v+" * "+s+"))",u="margin-left: calc(-"+h+"px / "+v+" * "+l.length+");")),c+="#"+t+" .ladi-collection .ladi-collection-content .ladi-collection-page.last.not-full .ladi-collection-item:first-child {",c+="margin-left: "+h+"px;",c+="}",c+="#"+t+" .ladi-collection-content .ladi-collection-page.last {",c+="width: calc("+getComputedStyle(e).width+" / "+v+" * "+l.length+" + calc("+h+"px / "+v+" * "+l.length+")) !important;",c+="}"):(o>1&&(i="calc(-"+a+" * "+(o-1)+")"),n="calc("+a+" * "+d.length+")");var p="style_collection_"+t,g=m.getElementById(p);isEmptyLadiPage(g)||g.parentElement.removeChild(g);var _="#"+t+" .ladi-collection-content {";_+="width: "+n+";",_+="left: "+i+";",_+=u,_+="}",_+=c,r.createStyleElement(p,_)}}(t),n&&u==r.const.COLLECTION_TYPE.readmore&&function(t){var e=m.getElementById(t);if(!isEmptyLadiPage(e)){var i=e.getElementsByClassName("ladi-collection-content")[0];if(e.hasAttribute("data-max-page")){var a=i.querySelector(".ladi-collection-page.last"),n=a.getElementsByClassName("ladi-collection-item"),o=Math.ceil(n.length/v);if(f==o)a.style.removeProperty("height");else{var d=parseFloatLadiPage((parseFloatLadiPage(getComputedStyle(a).height)||0)*o/f)||0;d-=parseFloatLadiPage(h*(f-o)/f)||0,a.style.setProperty("height",d+"px")}}var l=parseFloatLadiPage(getComputedStyle(e).height)||0,s=i.scrollHeight;if(l!=s){e.style.setProperty("height",s+"px");var c=r.findAncestor(e.parentElement,"ladi-element");isEmptyLadiPage(c)&&(c=r.findAncestor(e.parentElement,"ladi-section")),r.updateHeightElement(!0,e,c,l,s)}}}(t),r.runEventScroll(),r.runResizeAll()}},E=g["option.product_tag_id"],A=g["option.data_setting.value"];(o.is_generate_template||isArrayLadiPage(E)||!isEmptyLadiPage(A))&&L(t,g)}},LadiPageScriptV2.prototype.getListProductByTagId=function(t,e,i,a,n){var o=this,r=t["option.form_account_id"],d=t["option.product_type"],l=t["option.ladisale_store_id"]||null,s=t["option.product_tag_id"],c=t["option.data_setting.value"],u=t["option.data_setting.type_dataset"],p=t["option.collection_setting.type"],m=t["option.data_setting.sort_name"],g=t["option.data_setting.sort_by"],_=null,y=null,f=null,v=null,h=null;if(isArrayLadiPage(s)&&s.length>0){if(isEmptyLadiPage(o.runtime.tmp.product_tag_info[d])&&(o.runtime.tmp.product_tag_info[d]={}),isEmptyLadiPage(o.runtime.tmp.timeout_product_tag_info[d])&&(o.runtime.tmp.timeout_product_tag_info[d]={}),s.sort(),f=JSON.stringify(s)+"_page_"+i+"_limit_"+e,v=o.runtime.tmp.product_tag_info[d][f],-1!=[o.const.FORM_CONFIG_TYPE.ladisales,o.const.FORM_CONFIG_TYPE.sapo,o.const.FORM_CONFIG_TYPE.haravan,o.const.FORM_CONFIG_TYPE.shopify,o.const.FORM_CONFIG_TYPE.wordpress].indexOf(d)){y=function(){var t=null;return isObjectLadiPage(v)&&isArrayLadiPage(v.products)&&(t={products:v.products,total_record:v.total_record},isEmptyLadiPage(o.runtime.tmp.product_info[d])&&(o.runtime.tmp.product_info[d]={}),t.products.forEach(function(t){o.runtime.tmp.product_info[d][t.product_id]={store_info:v.store_info,product:t}})),t};var P=null;if(isStringLadiPage(v)&&(P=v,v=null),isNullLadiPage(v)){o.runtime.tmp.product_tag_info[d][f]=!0;var L=function(){o.runtime.tmp.product_tag_info[d][f]=!1,isEmptyLadiPage(o.runtime.tmp.timeout_product_tag_info[d][f])||(o.removeTimeout(o.runtime.tmp.timeout_product_tag_info[d][f]),delete o.runtime.tmp.timeout_product_tag_info[d][f])},E=function(t){if(v=t.data,isObjectLadiPage(v)){if(!isObjectLadiPage(v.store_info)){var a=o.runtime.currency;o.runtime.isClient||(a=window.$rootScope.getStoreCurrency()),v.store_info={currency:{code:a,symbol:o.formatCurrency(null,a,!1,!0)}}}if(d!=o.const.FORM_CONFIG_TYPE.ladisales&&(v.store_info.id=-1),isObjectLadiPage(v.store_info.currency)&&!isEmptyLadiPage(v.store_info.currency.code)&&(v.store_info.currency.symbol=o.formatCurrency(null,v.store_info.currency.code,!1,!0)),isArrayLadiPage(v.products))for(var r=null,l=function(t){return t.option1==r},c=0;c0&&isArrayLadiPage(e.variants)&&e.variants.length>0&&isObjectLadiPage(t.variants[0])&&t.variants[0].hasOwnProperty(m)&&isObjectLadiPage(e.variants[0])&&e.variants[0].hasOwnProperty(m)?g==o.const.SORT_BY_TYPE.asc?t.variants[0][m]-e.variants[0][m]:e.variants[0][m]-t.variants[0][m]:0}),w),_=y(),isFunctionLadiPage(n)&&n(_)}else L();var w},A={product_tag_ids:s,limit:e};isEmptyLadiPage(p)?A.type="group":A.paged=i,isEmptyLadiPage(m)||isEmptyLadiPage(g)||(A.sort={},A.sort[m]=g==o.const.SORT_BY_TYPE.desc?-1:1);var b=null,T="POST";return o.runLimitRequest(20,function(){if(o.runtime.isClient){var a="",n=o.const.API_LADISALE_COLLECTION_PRODUCT;d==o.const.FORM_CONFIG_TYPE.ladisales?(a=JSON.stringify([A.product_tag_ids,A.limit,A.type,A.paged,l,d]),(b={"Content-Type":"application/json"})["Store-Id"]=l,A=JSON.stringify(A)):d==o.const.FORM_CONFIG_TYPE.wordpress?(T="GET",n=window.location.origin+"/ladipage/api?action=product_list&category_ids="+s.join("|")+"&page="+i+"&limit="+e,A=null):(b={"Content-Type":"application/json"},n=o.const.API_COLLECTION_PRODUCT,A={form_account_id:r,tags:s,limit:e},isEmptyLadiPage(P)?A.page=i:A.page_info=P,a=JSON.stringify([A.form_account_id,A.tags,A.limit,A.page_info,A.page,d]),A=JSON.stringify(A)),!isEmptyLadiPage(a)&&isObjectLadiPage(o.runtime.tmp.product_data_website)&&isObjectLadiPage(o.runtime.tmp.product_data_website[a])?E({data:o.runtime.tmp.product_data_website[a]}):o.sendRequest(T,n,A,!0,b,function(t,e,i){if(i.readyState==XMLHttpRequest.DONE)try{var a=JSON.parse(t);E(a)}catch(t){L()}})}else{var c=function(t){if(isArrayLadiPage(t)&&t.length>1){var e={products:[]};t.forEach(function(t){if(isNullLadiPage(t.product)&&!isNullLadiPage(t.store_info)&&!isNullLadiPage(t.total_record))return e.store_info=t.store_info,void(e.total_record=t.total_record);isNullLadiPage(t.product)||e.products.push(t.product)}),E({data:e})}},u=LadiPage.mapping_attribute_option_product_id(t.element,"",!1,s,e,i,!0,function(t){c(t)});c(u)}}),_}}}else isEmptyLadiPage(c)||(y=function(){var t=null;if(isArrayLadiPage(h)){var a=o.copy(h);t={products:a=a.splice((i-1)*e,e),total_record:h.length},isEmptyLadiPage(o.runtime.tmp.product_info[d])&&(o.runtime.tmp.product_info[d]={}),h.forEach(function(t){o.runtime.tmp.product_info[d][t.id]={store_info:{},product:t}})}return t},h=o.loadDataset(c,c,u,m,g,!0,o.runtime.isClient,function(t){h=t,_=y(),isFunctionLadiPage(n)&&n(_)}));return isFunctionLadiPage(y)&&(!0===v?o.runtime.tmp.timeout_product_tag_info[d][f]=o.runTimeout(function(){o.getListProductByTagId(t,e,i,!1,n)},100):(_=y(),!a&&isFunctionLadiPage(n)&&n(_))),_},LadiPageScriptV2.prototype.changeTotalPriceCart=function(t){var e=0,i=0;this.runtime.tmp.cart.forEach(function(t){i+=t.quantity,isObjectLadiPage(t.promotion)?e+=t.promotion.total:e+=t.price*t.quantity}),e=e<0?0:e;var a=this.runtime.tmp.add_to_cart_fee_shipping||0,n=this.runtime.tmp.add_to_cart_discount||0,o=e+a-n;if(o=o<0?0:o,t)return{cart_price:e,cart_checkout_price:o,cart_fee_shipping:a,cart_discount:n,total_quantity:i};var r=this.formatNumber(e,3),d=this.formatNumber(o,3),l=this.formatNumber(a,3),s=this.formatNumber(n,3);if(this.runtime.tmp.cart.length>0&&!isEmptyLadiPage(this.runtime.tmp.cart[0].currency)&&!isEmptyLadiPage(this.runtime.tmp.cart[0].currency.symbol)){var c=this.runtime.tmp.cart[0].currency.symbol;r=this.formatCurrency(e,c,!0),d=this.formatCurrency(o,c,!0),l=this.formatCurrency(a,c,!0),s=this.formatCurrency(n,c,!0)}this.setDataReplaceStr("cart_price",r),this.setDataReplaceStr("cart_checkout_price",d),this.setDataReplaceStr("cart_fee_shipping",l),this.setDataReplaceStr("cart_discount",s),this.setDataReplaceStr("cart_quantity",i),this.setDataReplaceElement(!1)},LadiPageScriptV2.prototype.runAnimationDoc=function(t,e,i){var a=this;if(!isEmptyLadiPage(t)){if(isEmptyLadiPage(e)&&!isEmptyLadiPage(t.id)&&(e=a.runtime.eventData[t.id]),isNullLadiPage(i.is_child)&&(i.is_child=!1),isNullLadiPage(i.run_timeout)&&(i.run_timeout=!0),"carousel"==i.element_type){var n=a.findAncestor(t,"ladi-carousel");if(n=isEmptyLadiPage(n)?t:a.findAncestor(n,"ladi-element"),i.is_child&&!isEmptyLadiPage(n)&&i.run_timeout){var o=n.getElementsByClassName("ladi-carousel-content")[0],r=a.runtime.eventData[n.id],d=null,l=null,s=getComputedStyle(o).transitionProperty.split(",");s=s.removeSpace();var c=getComputedStyle(o).transitionDuration.split(",");c=c.removeSpace();var u={};return s.forEach(function(t,e){u[t]=1e3*(parseFloatLadiPage(c[e])||0)}),void(isEmptyLadiPage(r)||r[a.runtime.device+".option.carousel_setting.display_type"]!=a.const.CAROUSEL_DISPLAY_TYPE.vertical?a.runTimeout(function(){d=a.getElementBoundingClientRect(t),l=a.getElementBoundingClientRect(n),(d.x>=l.x&&d.x<=l.x+l.width||d.x+d.width>=l.x&&d.x+d.width<=l.x+l.width)&&(i.run_timeout=!1,a.runAnimationDoc(t,e,i))},u.left+100):a.runTimeout(function(){d=a.getElementBoundingClientRect(t),l=a.getElementBoundingClientRect(n),(d.y>=l.y&&d.y<=l.y+l.height||d.y+d.width>=l.y&&d.y+d.width<=l.y+l.height)&&(i.run_timeout=!1,a.runAnimationDoc(t,e,i))},u.top+100))}}else t.classList.contains("ladi-animation")&&t.classList.add("ladi-animation-hidden");if(t.classList.contains("ladi-animation-hidden")){var p=isObjectLadiPage(e)&&parseFloatLadiPage(e[a.runtime.device+".style.animation-delay"])||0;t.classList.add("ladi-animation"),a.runTimeout(function(){t.classList.remove("ladi-animation-hidden")},1e3*p)}if(i.is_multiple){var m=[];m="carousel"==i.element_type?t.querySelectorAll(".ladi-carousel .ladi-animation, .ladi-animation-hidden"):t.querySelectorAll(".ladi-animation, .ladi-animation-hidden"),i.is_child=!0;for(var g=0;gm?m:p,c.style.setProperty("width",p+"px"),u.style.setProperty("left","calc("+p+"px - "+u.clientWidth+"px / 2 - 3px / 2)")}return isEmptyLadiPage(e.runtime.current_element_mouse_down_carousel)||(i=document.getElementById(e.runtime.current_element_mouse_down_carousel),l=e.runtime.eventData[i.id],isObjectLadiPage(l)&&isEmptyLadiPage(l["option.meta_data.version"])&&(((a=t.pageX-e.runtime.current_element_mouse_down_carousel_position_x)>=e.runtime.mouse_down_diff_touch_action||-1*a>=e.runtime.mouse_down_diff_touch_action)&&(e.runtime.tmp.is_grab=!0),n=parseFloatLadiPage(i.getElementsByClassName("ladi-carousel-content")[0].getAttribute("data-left"))||0,(n+=a)<(r=-((parseFloatLadiPage(e.runtime.eventData[e.runtime.current_element_mouse_down_carousel][e.runtime.device+".option.carousel_crop.width"])||0)-i.clientWidth))&&(n=r),n>0&&(n=0),a>=e.runtime.current_element_mouse_down_carousel_diff?(delete e.runtime.timenext_carousel[e.runtime.current_element_mouse_down_carousel],e.runtime.current_element_mouse_down_carousel=null,e.runtime.current_element_mouse_down_carousel_position_x=0,e.runtime.current_element_mouse_down_carousel_position_y=0,i.getElementsByClassName("ladi-carousel-arrow-left")[0].click()):a<=-e.runtime.current_element_mouse_down_carousel_diff?(delete e.runtime.timenext_carousel[e.runtime.current_element_mouse_down_carousel],e.runtime.current_element_mouse_down_carousel=null,e.runtime.current_element_mouse_down_carousel_position_x=0,e.runtime.current_element_mouse_down_carousel_position_y=0,i.getElementsByClassName("ladi-carousel-arrow-right")[0].click()):i.getElementsByClassName("ladi-carousel-content")[0].style.setProperty("left",n+"px")),isObjectLadiPage(l)&&l["option.meta_data.version"]==e.const.META_VERSION.two&&(l[e.runtime.device+".option.carousel_setting.display_type"]==e.const.CAROUSEL_DISPLAY_TYPE.horizontal&&(((a=t.pageX-e.runtime.current_element_mouse_down_carousel_position_x)>=e.runtime.mouse_down_diff_touch_action||-1*a>=e.runtime.mouse_down_diff_touch_action)&&(e.runtime.tmp.is_grab=!0),n=parseFloatLadiPage(i.getElementsByClassName("ladi-carousel-content")[0].getAttribute("data-left"))||0,(n+=a)<(r=-((parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-carousel-content")[0]).width)||0)-i.clientWidth))&&(n=r),n>0&&(n=0),a>=e.runtime.current_element_mouse_down_carousel_diff?(delete e.runtime.timenext_carousel[e.runtime.current_element_mouse_down_carousel],e.runtime.current_element_mouse_down_carousel=null,e.runtime.current_element_mouse_down_carousel_position_x=0,e.runtime.current_element_mouse_down_carousel_position_y=0,i.getElementsByClassName("ladi-carousel-arrow-left")[0].click()):a<=-e.runtime.current_element_mouse_down_carousel_diff?(delete e.runtime.timenext_carousel[e.runtime.current_element_mouse_down_carousel],e.runtime.current_element_mouse_down_carousel=null,e.runtime.current_element_mouse_down_carousel_position_x=0,e.runtime.current_element_mouse_down_carousel_position_y=0,i.getElementsByClassName("ladi-carousel-arrow-right")[0].click()):i.getElementsByClassName("ladi-carousel-content")[0].style.setProperty("left",n+"px")),l[e.runtime.device+".option.carousel_setting.display_type"]==e.const.CAROUSEL_DISPLAY_TYPE.vertical&&(((a=t.pageY-e.runtime.current_element_mouse_down_carousel_position_y)>=e.runtime.mouse_down_diff_touch_action||-1*a>=e.runtime.mouse_down_diff_touch_action)&&(e.runtime.tmp.is_grab=!0),o=parseFloatLadiPage(i.getElementsByClassName("ladi-carousel-content")[0].getAttribute("data-top"))||0,(o+=a)<(d=-((parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-carousel-content")[0]).height)||0)-i.clientHeight))&&(o=d),o>0&&(o=0),a>=e.runtime.current_element_mouse_down_carousel_diff?(delete e.runtime.timenext_carousel[e.runtime.current_element_mouse_down_carousel],e.runtime.current_element_mouse_down_carousel=null,e.runtime.current_element_mouse_down_carousel_position_x=0,e.runtime.current_element_mouse_down_carousel_position_y=0,i.getElementsByClassName("ladi-carousel-arrow-left")[0].click()):a<=-e.runtime.current_element_mouse_down_carousel_diff?(delete e.runtime.timenext_carousel[e.runtime.current_element_mouse_down_carousel],e.runtime.current_element_mouse_down_carousel=null,e.runtime.current_element_mouse_down_carousel_position_x=0,e.runtime.current_element_mouse_down_carousel_position_y=0,i.getElementsByClassName("ladi-carousel-arrow-right")[0].click()):i.getElementsByClassName("ladi-carousel-content")[0].style.setProperty("top",o+"px")))),isEmptyLadiPage(e.runtime.current_element_mouse_down_gallery_view)||(i=document.querySelector('[data-runtime-id="'+e.runtime.current_element_mouse_down_gallery_view+'"]'),((a=t.pageX-e.runtime.current_element_mouse_down_gallery_view_position_x)>=e.runtime.mouse_down_diff_touch_action||-1*a>=e.runtime.mouse_down_diff_touch_action)&&(e.runtime.tmp.is_grab=!0),(s=parseFloatLadiPage(i.getAttribute("data-current"))||0)==(parseFloatLadiPage(i.getAttribute("data-max-item"))||0)-1&&a<0&&(a=0),a>0&&0==s&&(a=0),a>=e.runtime.current_element_mouse_down_gallery_view_diff?(e.runtime.current_element_mouse_down_gallery_view=null,e.runtime.current_element_mouse_down_gallery_view_position_x=0,e.runtime.current_element_mouse_down_gallery_view_position_y=0,i.getElementsByClassName("ladi-gallery-view-arrow-left")[0].click()):a<=-e.runtime.current_element_mouse_down_gallery_view_diff?(e.runtime.current_element_mouse_down_gallery_view=null,e.runtime.current_element_mouse_down_gallery_view_position_x=0,e.runtime.current_element_mouse_down_gallery_view_position_y=0,i.getElementsByClassName("ladi-gallery-view-arrow-right")[0].click()):i.querySelectorAll(".ladi-gallery-view-item.selected").length>0&&i.querySelectorAll(".ladi-gallery-view-item.selected")[0].style.setProperty("left",a+"px")),isEmptyLadiPage(e.runtime.current_element_mouse_down_gallery_control)||(i=document.querySelector('[data-runtime-id="'+e.runtime.current_element_mouse_down_gallery_control+'"]'),((a=t.pageX-e.runtime.current_element_mouse_down_gallery_control_position_x)>=e.runtime.mouse_down_diff_touch_action||-1*a>=e.runtime.mouse_down_diff_touch_action)&&(e.runtime.tmp.is_grab=!0),n=parseFloatLadiPage(i.getElementsByClassName("ladi-gallery-control-box")[0].getAttribute("data-left"))||0,(n+=a)<(r=(parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control")[0]).width)||0)-(parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control-box")[0]).width)||0))&&(n=r),n>0&&(n=0),i.getElementsByClassName("ladi-gallery-control-box")[0].style.setProperty("left",n+"px")),e.runtime.isDesktop||e.runtime.isBrowserDesktop||document.body.classList.add("grab"),!e.runtime.tmp.is_grab||(t.preventDefault(),!1)},LadiPageScriptV2.prototype.runEventMouseUp=function(t){t.stopPropagation();var e=this;e instanceof LadiPageScriptV2||(e=LadiPageScript),t=e.getEventCursorData(t);var i=null,a=null;if(delete e.runtime.tmp.is_grab,document.body.classList.remove("grab"),isEmptyLadiPage(e.runtime.current_element_mouse_down_carousel)||(i=document.getElementById(e.runtime.current_element_mouse_down_carousel),a=e.runtime.eventData[i.id],isObjectLadiPage(a)&&isEmptyLadiPage(a["option.meta_data.version"])&&i.getElementsByClassName("ladi-carousel-content")[0].style.setProperty("left",i.getElementsByClassName("ladi-carousel-content")[0].getAttribute("data-left")),isObjectLadiPage(a)&&a["option.meta_data.version"]==e.const.META_VERSION.two&&(a[e.runtime.device+".option.carousel_setting.display_type"]==e.const.CAROUSEL_DISPLAY_TYPE.horizontal&&i.getElementsByClassName("ladi-carousel-content")[0].style.setProperty("left",i.getElementsByClassName("ladi-carousel-content")[0].getAttribute("data-left")),a[e.runtime.device+".option.carousel_setting.display_type"]==e.const.CAROUSEL_DISPLAY_TYPE.vertical&&i.getElementsByClassName("ladi-carousel-content")[0].style.setProperty("top",i.getElementsByClassName("ladi-carousel-content")[0].getAttribute("data-top")))),isEmptyLadiPage(e.runtime.current_element_mouse_down_gallery_view)||(i=document.querySelector('[data-runtime-id="'+e.runtime.current_element_mouse_down_gallery_view+'"]')).querySelectorAll(".ladi-gallery-view-item.selected").length>0&&i.querySelectorAll(".ladi-gallery-view-item.selected")[0].style.removeProperty("left"),!isEmptyLadiPage(e.runtime.current_element_mouse_down_gallery_control))if((i=document.querySelector('[data-runtime-id="'+e.runtime.current_element_mouse_down_gallery_control+'"]')).getElementsByClassName("ladi-gallery-control-box")[0].removeAttribute("data-left"),i.getElementsByClassName("ladi-gallery-control-box")[0].style.removeProperty("transition-duration"),i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.remove("opacity-0"),i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.remove("opacity-0"),i.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-top")||i.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-bottom")){var n=parseFloatLadiPage(i.getElementsByClassName("ladi-gallery-control-box")[0].style.getPropertyValue("left"))||0,o=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control-box")[0]).width)||0;o=(o=-(o-=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control")[0]).width)||0))>0?0:o,n>0&&(n=0),n>=0&&i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.add("opacity-0"),n<=o&&i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.add("opacity-0")}else{var r=parseFloatLadiPage(i.getElementsByClassName("ladi-gallery-control-box")[0].style.getPropertyValue("top"))||0,d=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control-box")[0]).height)||0;d=(d=-(d-=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control")[0]).height)||0))>0?0:d,r>0&&(r=0),r>=0&&i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.add("opacity-0"),r<=d&&i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.add("opacity-0")}e.runtime.current_element_mouse_down_image_compare=null,e.runtime.current_element_mouse_down_image_compare_position_x=0,delete e.runtime.timenext_carousel[e.runtime.current_element_mouse_down_carousel],e.runtime.current_element_mouse_down_carousel=null,e.runtime.current_element_mouse_down_carousel_position_x=0,e.runtime.current_element_mouse_down_carousel_position_y=0,e.runtime.current_element_mouse_down_gallery_view=null,e.runtime.current_element_mouse_down_gallery_view_position_x=0,e.runtime.current_element_mouse_down_gallery_view_position_y=0;var l=0;e.runtime.current_element_mouse_down_gallery_control_time+e.runtime.current_element_mouse_down_gallery_control_time_click0;)i[0].classList.remove("ladi-lazyload");e.runtime.tmp.isRunScrollEvent=!0}if(!isEmptyLadiPage(e.runtime.eventData)&&!e.runtime.tmp.is_run_show_popup){for(var a=null,n=document.querySelectorAll('[data-popup-backdrop="true"]'),o=0;o=n&&window.scrollY<=n+d.offsetHeight||window.scrollY+e.getHeightDevice()>=n&&window.scrollY+e.getHeightDevice()<=n+d.offsetHeight||n>=window.scrollY&&window.scrollY+e.getHeightDevice()>=n)&&(p=!0)):(n=e.getElementBoundingClientRect(d).y+window.scrollY,(window.scrollY>=n&&window.scrollY<=n+d.offsetHeight||window.scrollY+e.getHeightDevice(!0)>=n&&window.scrollY+e.getHeightDevice(!0)<=n+d.offsetHeight||n>=window.scrollY&&window.scrollY+e.getHeightDevice(!0)>=n)&&(p=!0)),p&&(o=e.runtime.list_scroll_func[u],delete e.runtime.list_scroll_func[u],o())}}var m=i[e.runtime.device+".style.animation-name"];if(!isEmptyLadiPage(m)&&(d=document.getElementById(t),!isEmptyLadiPage(d)&&!d.classList.contains("ladi-animation"))){var g=e.findAncestor(d,"ladi-popup"),_=parseFloatLadiPage(i[e.runtime.device+".style.animation-delay"])||0;n=e.getElementBoundingClientRect(d).y+window.scrollY;var y=window.scrollY>=n&&window.scrollY<=n+d.offsetHeight||window.scrollY+e.getHeightDevice(!0)>=n&&window.scrollY+e.getHeightDevice(!0)<=n+d.offsetHeight||n>=window.scrollY&&window.scrollY+e.getHeightDevice(!0)>=n;if(e.runtime.tmp.isFirstScroll&&_>0&&d.classList.add("ladi-animation-hidden"),y)if(isEmptyLadiPage(g)){var f=e.findAncestor(d,"ladi-carousel");isEmptyLadiPage(f)?(d.classList.add("ladi-animation"),e.runTimeout(function(){d.classList.remove("ladi-animation-hidden")},1e3*_)):(d.classList.add("ladi-animation-hidden"),f=e.findAncestor(f,"ladi-element"),e.runAnimationDoc(f,null,{is_multiple:!0,element_type:"carousel"}))}else d.classList.add("ladi-animation-hidden")}if(isEmptyLadiPage(a)||-1!=r.indexOf(t)){var v=null,h=null,P=null;if(i[e.runtime.device+".option.sticky"]&&(v=i[e.runtime.device+".option.sticky_position"],h=parseFloatLadiPage(i[e.runtime.device+".option.sticky_position_top"]),P=parseFloatLadiPage(i[e.runtime.device+".option.sticky_position_bottom"])),!e.runtime.has_popupx&&!isEmptyLadiPage(v)){var L=document.getElementById(t);if(!isEmptyLadiPage(L)&&L.clientWidth>0&&L.clientHeight>0&&-1!=["default","top","bottom"].indexOf(v)){var E=e.getElementBoundingClientRect(L),A=L.getAttribute("data-top"),b=L.getAttribute("data-left");isEmptyLadiPage(A)?(L.setAttribute("data-top",E.y+window.scrollY),A=E.y):A=parseFloatLadiPage(A),isEmptyLadiPage(b)?(L.setAttribute("data-left",E.x+window.scrollX),b=E.x):b=parseFloatLadiPage(b);var T=null,w=null,S=e.getHeightDevice(),O=document.getElementsByClassName("ladi-wraper")[0],C=0,I=0,N=0,k=0;if("default"==v&&(h>=A-window.scrollY?(T=h+"px",w=b+"px",h<=0&&(C=L.clientHeight),N=L.clientHeight):S-P-L.clientHeight<=A-window.scrollY&&(T="calc(100% - "+(P+L.clientHeight)+"px)",w=b+"px",P<=0&&(I=L.clientHeight),k=L.clientHeight)),"top"==v&&(h>=A-window.scrollY||S-0A+L.clientHeight-window.scrollY)&&(T="calc(100% - "+(P+L.clientHeight)+"px)",w=b+"px",P<=0&&(I=L.clientHeight),k=L.clientHeight),isEmptyLadiPage(T)||isEmptyLadiPage(w))L.style.removeProperty("top"),L.style.removeProperty("left"),L.style.removeProperty("width"),L.style.removeProperty("position"),L.style.removeProperty("z-index"),O.getAttribute("data-padding-top-id")==t&&(O.removeAttribute("data-padding-top-id"),O.style.removeProperty("padding-top")),O.getAttribute("data-padding-bottom-id")==t&&(O.removeAttribute("data-padding-bottom-id"),O.style.removeProperty("padding-bottom"));else if("section"==i.type&&(e.runtime.is_mobile_only?L.style.setProperty("width",O.clientWidth+"px"):e.runtime.isDesktop&&L.style.setProperty("width","100%"),C>0&&(O.setAttribute("data-padding-top-id",t),O.style.setProperty("padding-top",C+"px")),I>0&&(O.setAttribute("data-padding-bottom-id",t),O.style.setProperty("padding-bottom",I+"px")),N>0&&O.setAttribute("data-scroll-padding-top",N),k>0&&O.setAttribute("data-scroll-padding-bottom",k)),L.style.setProperty("top",T),L.style.setProperty("left",w),L.style.setProperty("position","fixed"),L.style.setProperty("z-index","90000050"),!L.hasAttribute("data-sticky")){L.setAttribute("data-sticky",!0);var x=parseFloatLadiPage(i[e.runtime.device+".style.animation-delay"])||0;L.classList.contains("ladi-animation")&&(x=0),e.runTimeout(function(){L.classList.contains("ladi-animation-hidden")&&(L.classList.remove("ladi-animation-hidden"),L.classList.add("ladi-animation"));for(var t=L.getElementsByClassName("ladi-animation-hidden");t.length>0;)t[0].classList.add("ladi-animation"),t[0].classList.remove("ladi-animation-hidden");L.classList.remove("ladi-lazyload");for(var e=L.getElementsByClassName("ladi-lazyload");e.length>0;)e[0].classList.remove("ladi-lazyload")},1e3*x)}}}}if("popup"==i.type){if(!isEmptyLadiPage(e.runtime.scroll_show_popup[t]))return;isEmptyLadiPage(i["option.popup_welcome_page_scroll_to"])||(d=document.getElementById(i["option.popup_welcome_page_scroll_to"]),!isEmptyLadiPage(d)&&d.offsetHeight>0&&(n=d.offsetTop,(window.scrollY>=n&&window.scrollY<=n+d.offsetHeight||window.scrollY+e.getHeightDevice()>=n&&window.scrollY+e.getHeightDevice()<=n+d.offsetHeight||n>=window.scrollY&&window.scrollY+e.getHeightDevice()>=n)&&(e.runtime.scroll_show_popup[t]=!0,window.ladi(t).show())))}if("section"==i.type){if(!isEmptyLadiPage(e.runtime.scroll_to_section[t]))return;d=document.getElementById(t),!isEmptyLadiPage(d)&&d.offsetHeight>0&&(n=d.offsetTop,(window.scrollY>=n&&window.scrollY<=n+d.offsetHeight||window.scrollY+e.getHeightDevice()>=n&&window.scrollY+e.getHeightDevice()<=n+d.offsetHeight||n>=window.scrollY&&window.scrollY+e.getHeightDevice()>=n)&&(e.runtime.scroll_to_section[t]=!0,e.runEventTracking(t,{is_form:!1})))}}),e.runtime.isClient&&document.body.clientHeight>0){var s=Math.round((window.scrollY+e.getHeightDevice())/document.body.clientHeight*100);s=s>100?100:s;var c=function(t){var i=function(t){if(t||isObjectLadiPage(window.ladi_conversion_api)&&isObjectLadiPage(window.ladi_conversion_api.tiktok)&&isArrayLadiPage(window.ladi_conversion_api.tiktok.pixels))return{event_id:"ladi."+Date.now()+"."+(Math.floor(9e10*Math.random())+1e10)};return{}}(e.runtime.is_popupx),a=null;e.runtime.is_popupx?e.runLadiPageCommand(function(n){if("ViewContent"==n.name&&t>=n.scrollPercent)return a=[{name:n.name,custom_data:{},data:i}],e.runtime.tmp.runActionPopupX({conversion_name:n.name,ttq_data:{},ttq_event_data:i,action:{type:"run_tracking_ttq"}}),e.runtime.tmp.runActionPopupX({type:"tiktok",key:"events",keyData:a,action:{type:"run_conversion_api"}}),!0}):LadiPageQueueCommand.push(function(){return!isNullLadiPage(window.ttq)},function(){e.runLadiPageCommand(function(n){if("ViewContent"==n.name&&t>=n.scrollPercent)return a=[{name:n.name,custom_data:{},data:i}],window.ttq.track(n.name,{},i),e.runConversionApi("tiktok","events",a),!0})})},u=function(t){LadiPageQueueCommand.push(function(){return isFunctionLadiPage(window.fbq)},function(){window.fbq("trackCustom","ScrollDepth_"+t+"_percent")})},p=function(t){LadiPageQueueCommand.push(function(){return isFunctionLadiPage(window.gtag)},function(){window.gtag("event","ScrollDepth_"+t+"_percent",{event_category:"LadiPageScrollDepth",event_label:window.location.host+window.location.pathname,non_interaction:!0})})};if(!e.runtime.is_popupx)for(var m=1;me.const.PERCENT_TRACKING_SCROLL[m-1]&&s<=g&&-1==e.runtime.scroll_depth.indexOf(g)&&(e.runtime.scroll_depth.push(g),u(g),p(g),c(s))}}if(e.runtime.tmp.isFirstScroll=!1,!isEmptyLadiPage(t)){var _=0,y=Object.values(e.runtime.list_scrolling_exec);if(isEmptyLadiPage(e.runtime.tmp.timeout_scrolling_id))for(_=0;_ .ladi-element"),d=!1,l=!1;e||(LadiPagePlugin.getPlugin("popup").removeStyleShowPopupBuilder(),LadiPagePlugin.getPlugin("popup").removeStyleShowPopupBuilderScroll());var s=function(){if(!o.runtime.tmp.is_resize_all&&!o.runtime.tmp.is_wait_popup){var t=document.getElementById("style_popup");isEmptyLadiPage(t)||t.parentElement.removeChild(t)}},c=[],u=0;if(isEmptyLadiPage(t))for(u=0;u .ladi-element"),o=0;o0;){r.runtime.list_show_popup_func[e].shift()()}var p=d.hasAttribute("data-scroll"),m=d.hasAttribute("data-fixed-close"),g=!1,_=d.getElementsByClassName("ladi-popup")[0],y=1e3*(parseFloatLadiPage(getComputedStyle(_).animationDuration)||0),f=1e3*(parseFloatLadiPage(getComputedStyle(_).animationDelay)||0),v=parseFloatLadiPage(d.getAttribute("data-timeout-id"))||null;r.removeTimeout(v),v=parseFloatLadiPage(d.getAttribute("data-timeout-id-2"))||null,r.removeTimeout(v),!n||"true"==d.getAttribute("data-dropbox")||r.runtime.tmp.is_resize_all||r.runtime.tmp.is_wait_popup||isEmptyLadiPage(d.style.getPropertyValue("max-height"))&&(r.runtime.has_popupx||d.style.setProperty("visibility","hidden"));if(d.classList.add("ladi-animation-hidden"),"block"!=getComputedStyle(d).display&&d.style.setProperty("display","block","important"),v=r.runTimeout(function(){d.classList.remove("ladi-animation-hidden"),d.removeAttribute("data-timeout-id"),function(){for(var t=_.getElementsByClassName("ladi-animation");t.length>0;)t[0].classList.add("ladi-animation-hidden"),t[0].classList.remove("ladi-animation");isObjectLadiPage(r.runtime.tmp.list_timeout_popup_id)||(r.runtime.tmp.list_timeout_popup_id={}),isArrayLadiPage(r.runtime.tmp.list_timeout_popup_id[e])||(r.runtime.tmp.list_timeout_popup_id[e]=[]),r.runtime.tmp.list_timeout_popup_id[e].forEach(function(t){r.removeTimeout(t)}),r.runtime.tmp.list_timeout_popup_id[e]=[]}(),v=r.runTimeout(function(){!function(){for(var t=function(t){var i=r.findAncestor(t,"ladi-element"),a=0;if(!isEmptyLadiPage(i)){var n=r.runtime.eventData[i.id];isEmptyLadiPage(n)||(a=parseFloatLadiPage(n[r.runtime.device+".style.animation-delay"])||0)}t.classList.add("ladi-animation");var o=r.runTimeout(function(){t.classList.remove("ladi-animation-hidden")},1e3*a);r.runtime.tmp.list_timeout_popup_id[e].push(o)},i=function(){for(var t=[],e=_.getElementsByClassName("ladi-animation-hidden"),i=0;i.8*r.getHeightDevice()&&(n?r.runtime.has_popupx?g=!0:(d.setAttribute("data-scroll",!0),d.style.setProperty("overflow-y","auto","important"),d.style.setProperty("overflow-x","hidden","important"),p=!0):m=!0),r.runtime.has_popupx&&(g?(d.setAttribute("data-fixed-close",!0),document.body.style.setProperty("height",d.clientHeight+"px")):document.body.style.removeProperty("height")),p&&n)){var h=d.scrollTop;d.getElementsByClassName("ladi-popup")[0].style.removeProperty("height"),d.style.removeProperty("max-height"),d.getElementsByClassName("ladi-popup")[0].style.setProperty("height",d.clientHeight+"px","important"),d.style.setProperty("max-height","80vh"),d.scrollTop=h}!n&&m&&LadiPagePlugin.getPlugin("popup").styleShowPopupBuilderScroll(e),r.runtime.has_popupx&&(c+=n?"#"+r.runtime.backdrop_popup_id+" { display: none !important;}":"#"+r.runtime.backdrop_popup_id+" { display: block !important;}",d.style.removeProperty("max-height"),d.style.removeProperty("overflow-y"),d.style.removeProperty("overflow-x")),isEmptyLadiPage(c)||r.runtime.tmp.is_resize_all||r.runtime.tmp.is_wait_popup||r.createStyleElement("style_popup",c);var P=null;if(n&&!isEmptyLadiPage(d)&&"true"!=d.getAttribute("data-dropbox")){var L=d.getElementsByClassName("popup-close")[0];isEmptyLadiPage(L)&&((L=document.createElement("div")).className="popup-close",d.appendChild(L),L.addEventListener("click",function(t){t.stopPropagation(),r.runtime.tmp["popup_closing_"+e]=!0,r.runRemovePopup(e,n),r.runTimeout(function(){delete r.runtime.tmp["popup_closing_"+e]},500)})),v=parseFloatLadiPage(L.getAttribute("data-timeout-id"))||null,r.removeTimeout(v),"true"==d.getAttribute("data-scroll")&&(L.style.removeProperty("right"),L.style.removeProperty("top"),L.style.removeProperty("position")),r.runtime.has_popupx&&r.runtime.tmp.popupx_is_inline&&L.classList.add("ladi-hidden");var E=function(){if(L=d.getElementsByClassName("popup-close")[0],!isEmptyLadiPage(L))if("true"==d.getAttribute("data-scroll")){var t=r.getElementBoundingClientRect(d),e=t.y,i=window.innerWidth-t.x-t.width;(p||g)&&(i+=r.runtime.widthScrollBar),L.style.setProperty("right",i+"px"),L.style.setProperty("top",e+"px"),L.style.setProperty("position","fixed")}else L.style.removeProperty("right"),L.style.removeProperty("top"),L.style.removeProperty("position")};E(),P=function(){v=r.runTimeout(function(){E(),L.removeAttribute("data-timeout-id")},y+f+100),L.setAttribute("data-timeout-id",v)},(p||g)&&(d.hasAttribute("data-resize-scroll")||(d.setAttribute("data-resize-scroll",!0),window.addEventListener("resize",E)))}n&&!u&&(r.runEventTracking(e,{is_form:!1,is_open_popup:!0,is_custom:!0,event:o.event}),r.runActionPopupShow(e));var A=function(){var t=s;v=r.runTimeout(function(){delete r.runtime.tmp.is_run_show_popup,r.runEventScroll(),isFunctionLadiPage(P)&&P(),d.removeAttribute("data-timeout-id-2")},t),isEmptyLadiPage(v)||d.setAttribute("data-timeout-id-2",v),d.style.removeProperty("visibility")};if(t)A();else{v=r.runTimeout(function(){"none"==getComputedStyle(d).display?(s-=100,A()):l(!0),d.removeAttribute("data-timeout-id-2")},100),d.setAttribute("data-timeout-id-2",v)}d.removeAttribute("data-timeout-id-3")},s=0;i==r.const.POSITION_TYPE.default&&(s=100);var c=r.runTimeout(function(){l(t)},s);isEmptyLadiPage(d)||d.setAttribute("data-timeout-id-3",c)}}},LadiPageScriptV2.prototype.convertPhoneNumberFormData=function(t){for(var e=null,i=[{startStr:"+84",endStr:"(9|8|7|5|3)[0-9]{8}",listRegex:[{str_start:"0",str_input:"0"},{str_start:"\\+84",str_input:"+84"}]}],a=0;a0;){var t=window.ladi_global_tracking.thankyou_page.shift();this.runEventTracking(null,t)}},LadiPageScriptV2.prototype.runLadiPageCommand=function(t){if(isArrayLadiPage(LadiPageCommand))for(var e=0;e0&&(n=t.facebook_pixel.split(",").removeSpace()).length>0){i+="